mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-25 22:49:34 +01:00
Timer resolution is now nanoseconds
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
|
||||
namespace Catch {
|
||||
|
||||
auto getCurrentMicrosecondsSinceEpoch() -> uint64_t {
|
||||
return std::chrono::duration_cast<std::chrono::microseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
|
||||
auto getCurrentNanosecondsSinceEpoch() -> uint64_t {
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
|
||||
}
|
||||
|
||||
} // namespace Catch
|
||||
|
||||
Reference in New Issue
Block a user