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)
33 ostream &operator<<(ostream &out, const TimeDelta &td)
38 int64_t value=td.raw();
50 else if(value<1000000)
55 ss<<'.'<<setw(3)<<value;
61 print_part(ss, value, 86400000000LL, 0, first);
62 print_part(ss, value, 3600000000LL, '-', first);
63 print_part(ss, value, 60000000LL, ':', first);
64 print_part(ss, value, 1000000LL, ':', first);
72 ss<<setw(3)<<value/1000;