1 #ifndef UTIL_CLOCK_MAN_UTILS_H_INCLUDED
2 #define UTIL_CLOCK_MAN_UTILS_H_INCLUDED
48 hours hh = duration_cast < hours > (d);
49 minutes mm = duration_cast < minutes > (d % hours(1));
50 seconds ss = duration_cast < seconds > (d % minutes(1));
52 oss << right << setfill(
'0') << setw(2) << hh.count() <<
":" << setw(2) << mm.count()
53 <<
":" << setw(2) << ss.count();
64 hours hh = duration_cast < hours > (d);
65 minutes mm = duration_cast < minutes > (d % hours(1));
66 seconds ss = duration_cast < seconds > (d % minutes(1));
67 milliseconds milli = duration_cast < milliseconds > (d % seconds(1));
69 oss << right << setfill(
'0') << setw(2) << hh.count() <<
":" << setw(2) << mm.count()
70 <<
":" << setw(2) << ss.count() <<
":" << setw(3) << milli.count();
81 hours hh = duration_cast < hours > (d);
82 minutes mm = duration_cast < minutes > (d % hours(1));
83 seconds ss = duration_cast < seconds > (d % minutes(1));
84 milliseconds milli = duration_cast < milliseconds > (d % seconds(1));
85 microseconds micro = duration_cast < microseconds > (d % milliseconds(1));
87 oss << right << setfill(
'0') << setw(2) << hh.count() <<
":" << setw(2) << mm.count()
88 <<
":" << setw(2) << ss.count() <<
":" << setw(3) << milli.count() <<
":" << setw(3) << micro.count();
99 hours hh = duration_cast < hours > (d);
100 minutes mm = duration_cast < minutes > (d % hours(1));
101 seconds ss = duration_cast < seconds > (d % minutes(1));
102 milliseconds milli = duration_cast < milliseconds > (d % seconds(1));
103 microseconds micro = duration_cast < microseconds > (d % milliseconds(1));
104 nanoseconds nano = duration_cast < nanoseconds > (d % microseconds(1));
106 oss << right << setfill(
'0') << setw(2) << hh.count() <<
":" << setw(2) << mm.count()
107 <<
":" << setw(2) << ss.count() <<
":" << setw(3) << milli.count() <<
":" << setw(3) << micro.count()
108 <<
":" << setw(3) << nano.count();
116 #endif // end of include guard
static std::string ToColonString(std::chrono::milliseconds d)
Produce string in hh:mm:ss:mus format.
static std::string ToColonString(std::chrono::seconds d)
Procude string in hh:mm:ss format.
Namespace for the core simulator.
Utilities to tag clocks and to reformat number of ticks to a string.
static std::string ToColonString(std::chrono::microseconds d)
Produce string in hh:mm:ss:ms:mus format.
static std::string ToColonString(std::chrono::nanoseconds d)
Produce string in hh:mm:ss:ms:mus:ns format.