MCPcopy Create free account
hub / github.com/apache/thrift / getCurrentTicks

Function getCurrentTicks

compiler/cpp/tests/catch/catch.hpp:8498–8507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8496 namespace {
8497#ifdef CATCH_PLATFORM_WINDOWS
8498 UInt64 getCurrentTicks() {
8499 static UInt64 hz=0, hzo=0;
8500 if (!hz) {
8501 QueryPerformanceFrequency( reinterpret_cast<LARGE_INTEGER*>( &hz ) );
8502 QueryPerformanceCounter( reinterpret_cast<LARGE_INTEGER*>( &hzo ) );
8503 }
8504 UInt64 t;
8505 QueryPerformanceCounter( reinterpret_cast<LARGE_INTEGER*>( &t ) );
8506 return ((t-hzo)*1000000)/hz;
8507 }
8508#else
8509 UInt64 getCurrentTicks() {
8510 timeval t;

Callers 2

startMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected