X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ftime%2Ftimedelta.cpp;h=a56e0fe8a3944763240b79689a55adc3d69c9ad5;hp=891d56007a0316ff5b5a447383aaa72a6dd7ee54;hb=be8ea216d23bf36bdfb2d3e302638782575fc136;hpb=e1ea831a640fba534e7e42e399f04cdf681ef8d3 diff --git a/source/time/timedelta.cpp b/source/time/timedelta.cpp index 891d560..a56e0fe 100644 --- a/source/time/timedelta.cpp +++ b/source/time/timedelta.cpp @@ -1,99 +1,88 @@ -/* -This file is part of libmspframework -Copyright © 2006 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ -#include +#include #include "timedelta.h" -#include "units.h" using namespace std; -namespace Msp { -namespace Time { +namespace { + +using Msp::Time::RawTime; -void print_part(ostream &out, int64_t &value, int64_t unit, char sep, bool &first) +string format_part(RawTime &value, RawTime unit, char sep, bool &first) { - if(value>=unit || !first) + if(value