diff options
author | Jack Lloyd <[email protected]> | 2018-12-23 14:26:53 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-12-23 14:26:53 -0500 |
commit | dd49d5da18b4551285fb8f4a5a3a60d7c6ca1eb2 (patch) | |
tree | 117e491c4f9a0225b336477308118d73e3d74b1f /src/lib/utils/timer.h | |
parent | f10db2ae3d361132202e8e31376374d0d280482a (diff) |
De-inline more of Timer
No reason for these to be inlined
Diffstat (limited to 'src/lib/utils/timer.h')
-rw-r--r-- | src/lib/utils/timer.h | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/src/lib/utils/timer.h b/src/lib/utils/timer.h index 86a17b462..6be6c333a 100644 --- a/src/lib/utils/timer.h +++ b/src/lib/utils/timer.h @@ -38,22 +38,7 @@ class BOTAN_TEST_API Timer final Timer(const Timer& other) = default; - static uint64_t get_system_timestamp_ns() - { - return Botan::OS::get_system_timestamp_ns(); - } - - static uint64_t get_cpu_cycle_counter() - { - return Botan::OS::get_processor_timestamp(); - } - - void start() - { - stop(); - m_timer_start = Timer::get_system_timestamp_ns(); - m_cpu_cycles_start = Timer::get_cpu_cycle_counter(); - } + void start(); void stop(); @@ -167,29 +152,9 @@ class BOTAN_TEST_API Timer final m_custom_msg = s; } - bool operator<(const Timer& other) const - { - if(this->doing() != other.doing()) - return (this->doing() < other.doing()); + bool operator<(const Timer& other) const; - return (this->get_name() < other.get_name()); - } - - std::string to_string() const - { - if(m_custom_msg.size() > 0) - { - return m_custom_msg; - } - else if(this->buf_size() == 0) - { - return result_string_ops(); - } - else - { - return result_string_bps(); - } - } + std::string to_string() const; private: std::string result_string_bps() const; |