chrono: address post-commit comments from majnemer
Correct style to match libc++ style as pointed out by David Majnemer on IRC. NFC. llvm-svn: 290805
This commit is contained in:
parent
78f51f95a4
commit
cfc01154c3
|
@ -160,14 +160,14 @@ steady_clock::now() _NOEXCEPT
|
|||
steady_clock::time_point
|
||||
steady_clock::now() _NOEXCEPT
|
||||
{
|
||||
static LARGE_INTEGER liFreq;
|
||||
static BOOL bQPFRun = FALSE;
|
||||
if (bQPFRun == FALSE)
|
||||
bQPFRun = QueryPerformanceFrequency(&liFreq);
|
||||
static LARGE_INTEGER freq;
|
||||
static BOOL initialized = FALSE;
|
||||
if (!initialized)
|
||||
initialized = QueryPerformanceFrequency(&freq); // always succceeds
|
||||
|
||||
LARGE_INTEGER liCntr;
|
||||
QueryPerformanceCounter(&liCntr);
|
||||
return time_point(duration(liCntr.QuadPart * nano::den / liFreq.QuadPart));
|
||||
LARGE_INTEGER counter;
|
||||
QueryPerformanceCounter(&counter);
|
||||
return time_point(duration(counter.QuadPart * nano::den / freq.QuadPart));
|
||||
}
|
||||
|
||||
#elif defined(CLOCK_MONOTONIC)
|
||||
|
|
Loading…
Reference in New Issue