X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftime%2Ftimedelta.cpp;h=68e836178a325dfbcbba429c58923085d95e0899;hb=f5951e7166dfd7028b95d7c780406f65afc5cdfc;hp=891d56007a0316ff5b5a447383aaa72a6dd7ee54;hpb=e1ea831a640fba534e7e42e399f04cdf681ef8d3;p=libs%2Fcore.git diff --git a/source/time/timedelta.cpp b/source/time/timedelta.cpp index 891d560..68e8361 100644 --- a/source/time/timedelta.cpp +++ b/source/time/timedelta.cpp @@ -1,98 +1,86 @@ -/* -This file is part of libmspframework +/* $Id$ + +This file is part of libmspcore 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