summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pchrono.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/plib/pchrono.h')
-rw-r--r--src/lib/netlist/plib/pchrono.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/netlist/plib/pchrono.h b/src/lib/netlist/plib/pchrono.h
index 4e0bb071431..8eb2e64d358 100644
--- a/src/lib/netlist/plib/pchrono.h
+++ b/src/lib/netlist/plib/pchrono.h
@@ -35,7 +35,7 @@ namespace plib {
struct base_ticks
{
using ret_type = R;
- static ret_type per_second()
+ static ret_type per_second() noexcept
{
static ret_type persec = 0;
if (persec == 0)
@@ -179,9 +179,9 @@ namespace plib {
struct counter<false>
{
using type = uint_least64_t;
- constexpr type operator()() const { return 0; }
- void inc() const { }
- void reset() const { }
+ constexpr type operator()() const noexcept { return 0; }
+ void inc() const noexcept { }
+ void reset() const noexcept { }
constexpr static bool enabled = false;
};
@@ -212,14 +212,14 @@ namespace plib {
type operator()() const { return m_time; }
void reset() { m_time = 0; m_count = 0; }
- type average() const { return (m_count == 0) ? 0 : m_time / m_count; }
- type total() const { return m_time; }
- ctype count() const { return m_count; }
+ type average() const noexcept { return (m_count == 0) ? 0 : m_time / m_count; }
+ type total() const noexcept { return m_time; }
+ ctype count() const noexcept { return m_count; }
- double as_seconds() const { return static_cast<double>(total())
+ double as_seconds() const noexcept { return static_cast<double>(total())
/ static_cast<double>(T::per_second()); }
- guard_t guard() { return guard_t(*this); }
+ guard_t guard() noexcept { return guard_t(*this); }
private:
type m_time;
ctype m_count;
@@ -242,12 +242,12 @@ namespace plib {
~guard_t() { }
};
- constexpr type operator()() const { return 0; }
- void reset() const { }
- constexpr type average() const { return 0; }
- constexpr type total() const { return 0; }
- constexpr ctype count() const { return 0; }
- constexpr double as_seconds() const { return 0.0; }
+ constexpr type operator()() const noexcept { return 0; }
+ void reset() const noexcept { }
+ constexpr type average() const noexcept { return 0; }
+ constexpr type total() const noexcept { return 0; }
+ constexpr ctype count() const noexcept { return 0; }
+ constexpr double as_seconds() const noexcept { return 0.0; }
constexpr static bool enabled = false;
guard_t guard() { return guard_t(); }
};