9 #include <stk_util/environment/FormatTime.hpp> 21 TimeFormat time_format)
23 std::stringstream oss;
30 if ((time_format & TIMEFORMAT_STYLE_MASK) == TIMEFORMAT_SECONDS) {
31 if (time_format & TIMEFORMAT_MILLIS)
36 else if ((time_format & TIMEFORMAT_STYLE_MASK) == TIMEFORMAT_HMS) {
37 int int_time = int(time);
40 oss << (int_time)/3600 <<
':' 44 else if (time >= 60.0)
45 oss << ((int) (time)/60)%60 <<
':' 50 oss << ((int) time)%60;
52 if (time_format & TIMEFORMAT_MILLIS) {
53 int milliseconds = int(std::fmod(time, 1.0)*1000.0 + 0.5);
_setfill setfill(char fill)
Function setfill sets the fill character as a manipulator.
_setprecision setprecision(int precision)
Function setprecision sets the numeric precision as a manipulator.
_setw setw(int width)
Function setw sets the width for the next field as a manipulator.