2 This file is part of libmspcore
3 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
15 void print_part(ostream &out, int64_t &value, int64_t unit, char sep, bool &first)
17 if(value>=unit || !first)
32 ostream &operator<<(ostream &out, const TimeDelta &td)
38 else if(td.usec<1000000)
49 else if(td.usec<60000000)
63 ss<<td.usec/1000%1000;
72 print_part(ss, temp, day.raw(), '-', first);
73 print_part(ss, temp, hour.raw(), ':', first);
74 print_part(ss, temp, min.raw(), ':', first);
75 print_part(ss, temp, sec.raw(), 0, first);