gramods
TimeTools.hh
1 
2 #ifndef GRAMODS_CORE_TIMETOOLS
3 #define GRAMODS_CORE_TIMETOOLS
4 
5 #include <gmCore/config.hh>
6 
7 #include <chrono>
8 
9 BEGIN_NAMESPACE_GMCORE;
10 
14 struct TimeTools {
15 
16  typedef std::chrono::steady_clock clock;
17 
22  static clock::time_point secondsToTimePoint(double s);
23 
28  static double timePointToSeconds(clock::time_point t);
29 
34  static double durationToSeconds(clock::duration t);
35 
40  static clock::duration secondsToDuration(double s);
41 };
42 
43 END_NAMESPACE_GMCORE;
44 
45 #endif
Static functions for converting time.
Definition: TimeTools.hh:14