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