19 #ifndef hifi_PortableHighResolutionClock_h
20 #define hifi_PortableHighResolutionClock_h
24 #include <QtCore/QMetaType>
26 #if defined(_MSC_VER) && _MSC_VER < 1900
28 #ifndef WIN32_LEAN_AND_MEAN
29 #define WIN32_LEAN_AND_MEAN
36 struct win_high_resolution_clock {
37 typedef long long rep;
38 typedef std::nano period;
39 typedef std::chrono::duration<rep, period> duration;
40 typedef std::chrono::time_point<win_high_resolution_clock> time_point;
41 static const bool is_steady =
true;
43 static time_point now();
46 using p_high_resolution_clock = win_high_resolution_clock;
50 using p_high_resolution_clock = std::chrono::high_resolution_clock;
54 Q_DECLARE_METATYPE(p_high_resolution_clock::time_point);
56 #if defined(__GNUC__) && !defined(__clang__)
57 __attribute__((unused))
59 static const int timePointMetaTypeID = qRegisterMetaType<p_high_resolution_clock::time_point>();