X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftime%2Futils.h;h=dd325b0a1d546d18b92b402bbc1eb6578ec26df7;hb=HEAD;hp=9efe39a3715bf0cb40f486bfd9872aa08765e48e;hpb=e1ea831a640fba534e7e42e399f04cdf681ef8d3;p=libs%2Fcore.git diff --git a/source/time/utils.h b/source/time/utils.h index 9efe39a..dd325b0 100644 --- a/source/time/utils.h +++ b/source/time/utils.h @@ -1,20 +1,25 @@ -/* -This file is part of libmspframework -Copyright © 2006 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ #ifndef MSP_TIME_UTILS_H_ #define MSP_TIME_UTILS_H_ +#include +#include + namespace Msp { namespace Time { class TimeDelta; class TimeStamp; -extern TimeStamp now(); -extern TimeDelta get_cpu_time(); -extern int sleep(const TimeDelta &); +/** Returns the current timestamp. */ +MSPCORE_API TimeStamp now(); + +MSPCORE_API std::string format_now(const std::string &); + +/** Returns the CPU time used by the program so far. */ +MSPCORE_API TimeDelta get_cpu_time(); + +/** Sleeps for the given duration. */ +MSPCORE_API void sleep(const TimeDelta &); } // namespace Time } // namespace Msp