MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / Timer

Class Timer

src/client/client.h:28–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26#ifdef WIN32
27
28struct Timer
29{
30 LARGE_INTEGER start, stop, freq;
31
32public:
33 Timer() { QueryPerformanceFrequency( &freq ); }
34
35 void Start() { QueryPerformanceCounter(&start); }
36 double Sample()
37 {
38 QueryPerformanceCounter ( &stop );
39 double time = (double)(stop.QuadPart-start.QuadPart) / (double)(freq.QuadPart);
40 return time;
41 }
42};
43
44#elif defined(__APPLE__) || defined(__MACOSX)
45

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected