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:
Saleem Abdulrasool 2017-01-01 22:04:36 +00:00
parent 78f51f95a4
commit cfc01154c3
1 changed files with 7 additions and 7 deletions

View File

@ -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)