MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / query_performance_frequency

Function query_performance_frequency

src/common/utils.cpp:1063–1083  ·  view source on GitHub ↗

Returns frequency of performance counter in Hz

Source from the content-addressed store, hash-verified

1061
1062// Returns frequency of performance counter in Hz
1063SINT64 query_performance_frequency()
1064{
1065#if defined(WIN_NT)
1066 if (saved_frequency)
1067 return saved_frequency;
1068
1069 LARGE_INTEGER frequency;
1070 if (QueryPerformanceFrequency(&frequency) == 0)
1071 return 1;
1072
1073 saved_frequency = frequency.QuadPart;
1074 return frequency.QuadPart;
1075#elif defined(HAVE_CLOCK_GETTIME)
1076
1077 return BILLION;
1078#else
1079
1080 // This is not safe because of possible wrapping and very imprecise
1081 return CLOCKS_PER_SEC;
1082#endif
1083}
1084
1085
1086// returns system and user time in milliseconds that process runs

Callers 15

print_statsMethod · 0.85
timeToExpireMethod · 0.85
startMethod · 0.85
startSessionMethod · 0.85
currTimeMethod · 0.85
retrieveRecordMethod · 0.85
reportMethod · 0.85
finishMethod · 0.85
finishMethod · 0.85
finishMethod · 0.85
finishMethod · 0.85
TraceRuntimeStatsMethod · 0.85

Calls 1

Tested by

no test coverage detected