mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-07 07:51:00 +00:00
Timer resolution is now nanoseconds
This commit is contained in:
parent
c7028f7bc7
commit
39d37d9f34
2 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue