mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 05:59:24 +00:00
parent
572911d880
commit
090c74c420
1 changed files with 3 additions and 3 deletions
|
@ -27,11 +27,11 @@ namespace Catch {
|
||||||
uint64_t getCurrentTicks() {
|
uint64_t getCurrentTicks() {
|
||||||
static uint64_t hz=0, hzo=0;
|
static uint64_t hz=0, hzo=0;
|
||||||
if (!hz) {
|
if (!hz) {
|
||||||
QueryPerformanceFrequency((LARGE_INTEGER*)&hz);
|
QueryPerformanceFrequency( reinterpret_cast<LARGE_INTEGER*>( &hz ) );
|
||||||
QueryPerformanceCounter((LARGE_INTEGER*)&hzo);
|
QueryPerformanceCounter( reinterpret_cast<LARGE_INTEGER*>( &hzo ) );
|
||||||
}
|
}
|
||||||
uint64_t t;
|
uint64_t t;
|
||||||
QueryPerformanceCounter((LARGE_INTEGER*)&t);
|
QueryPerformanceCounter( reinterpret_cast<LARGE_INTEGER*>( &t ) );
|
||||||
return ((t-hzo)*1000000)/hz;
|
return ((t-hzo)*1000000)/hz;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue