2 This file is part of libmspcore
3 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
15 using Msp::Time::RawTime;
17 void print_part(ostream &out, RawTime &value, RawTime unit, char sep, bool &first)
19 if(value<unit && first)
35 ostream &operator<<(ostream &out, const TimeDelta &td)
40 RawTime value=td.raw();
52 else if(value<1000000)
57 ss<<'.'<<setw(3)<<value;
63 print_part(ss, value, 86400000000LL, 0, first);
64 print_part(ss, value, 3600000000LL, '-', first);
65 print_part(ss, value, 60000000LL, ':', first);
66 print_part(ss, value, 1000000LL, ':', first);
74 ss<<setw(3)<<value/1000;