MCPcopy Create free account
hub / github.com/cameron314/readerwriterqueue / getTimeDelta

Function getTimeDelta

benchmarks/systemtime.cpp:38–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38double getTimeDelta(SystemTime start)
39{
40 LARGE_INTEGER t;
41 CompilerMemBar();
42 if (start == static_cast<SystemTime>(-1) || !QueryPerformanceCounter(&t)) {
43 return -1;
44 }
45 CompilerMemBar();
46
47 auto now = static_cast<SystemTime>(t.QuadPart);
48
49 LARGE_INTEGER f;
50 if (!QueryPerformanceFrequency(&f)) {
51 return -1;
52 }
53
54 return static_cast<double>(static_cast<__int64>(now - start)) / f.QuadPart * 1000;
55}
56
57} // end namespace moodycamel
58

Callers 1

runBenchmarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected