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