Skip to content

Instantly share code, notes, and snippets.

@komiga
Created May 11, 2013 02:11
Show Gist options
  • Select an option

  • Save komiga/5558646 to your computer and use it in GitHub Desktop.

Select an option

Save komiga/5558646 to your computer and use it in GitHub Desktop.
Go home libstdc++ <chrono>, you're drunk.
#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC
/// steady_clock
struct steady_clock
{
typedef chrono::nanoseconds duration;
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<steady_clock, duration> time_point;
static constexpr bool is_steady = true;
static time_point
now() noexcept;
};
#else
typedef system_clock steady_clock;
#endif
typedef system_clock high_resolution_clock;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment