mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +01:00
Demote getCurrentNanosecondsSinceEpoch to internal linkage
This commit is contained in:
parent
5250cf6d58
commit
2deafc33e9
@ -9,13 +9,13 @@
|
|||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
static const uint64_t nanosecondsInSecond = 1000000000;
|
|
||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
auto getCurrentNanosecondsSinceEpoch() -> uint64_t {
|
namespace {
|
||||||
return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
|
static auto getCurrentNanosecondsSinceEpoch() -> uint64_t {
|
||||||
}
|
return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
|
||||||
|
}
|
||||||
|
} // end unnamed namespace
|
||||||
|
|
||||||
void Timer::start() {
|
void Timer::start() {
|
||||||
m_nanoseconds = getCurrentNanosecondsSinceEpoch();
|
m_nanoseconds = getCurrentNanosecondsSinceEpoch();
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
auto getCurrentNanosecondsSinceEpoch() -> uint64_t;
|
|
||||||
|
|
||||||
class Timer {
|
class Timer {
|
||||||
uint64_t m_nanoseconds = 0;
|
uint64_t m_nanoseconds = 0;
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user