Honeycomb  0.1
Component-Model Framework
Clock.h
Go to the documentation of this file.
1 // Honeycomb, Copyright (C) 2013 Daniel Carter. Distributed under the Boost Software License v1.0.
2 #pragma once
3 
4 #include "Honey/Math/Double.h"
5 
7 namespace honey { namespace platform
8 {
9 
10 template<class Subclass>
11 struct SystemClock
12 {
13  typedef TimePoint<Subclass, Microsec> TimePoint;
14 
15  static TimePoint now();
16 };
17 
18 template<class Subclass>
19 struct MonoClock
20 {
21  typedef TimePoint<Subclass, Nanosec> TimePoint;
22 
23  static TimePoint now();
24 
25 private:
26  static Double _toNano;
27  static LARGE_INTEGER _start;
28  static bool _init;
29  static bool init();
30 };
31 
32 template<class Subclass> Double MonoClock<Subclass>::_toNano;
33 template<class Subclass> LARGE_INTEGER MonoClock<Subclass>::_start;
34 template<class Subclass> bool MonoClock<Subclass>::_init = init();
35 
36 } }
Double_::Real Double
double type
Definition: Double.h:60
Global Honeycomb namespace.