30 lines · 820 B · C++
RawDownload
////  PortableHighResolutionClock.cpp//  libraries/shared/src////  Created by Stephen Birarda on 2015-09-14.//  Copyright 2015 High Fidelity, Inc.////  Distributed under the Apache License, Version 2.0.//  See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html// #if defined(_MSC_VER) && _MSC_VER < 1900 #include "PortableHighResolutionClock.h" namespace {    const long long g_Frequency = []() -> long long {        LARGE_INTEGER frequency;        QueryPerformanceFrequency(&frequency);        return frequency.QuadPart;    }();} win_high_resolution_clock::time_point win_high_resolution_clock::now() {    LARGE_INTEGER count;    QueryPerformanceCounter(&count);    return time_point(duration(count.QuadPart * static_cast<rep>(period::den) / g_Frequency));} #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t