X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ftime%2Futils.h;h=00b6ef86c274dca75cdaac1bd38eeaa353b3819d;hp=0a2b351ef6b218743122106697253f04803ef090;hb=HEAD;hpb=62a984b46e08740d19cb055f01be3365982f6b9d diff --git a/source/time/utils.h b/source/time/utils.h index 0a2b351..dd325b0 100644 --- a/source/time/utils.h +++ b/source/time/utils.h @@ -2,6 +2,7 @@ #define MSP_TIME_UTILS_H_ #include +#include namespace Msp { namespace Time { @@ -9,10 +10,16 @@ namespace Time { class TimeDelta; class TimeStamp; -extern TimeStamp now(); -extern std::string format_now(const std::string &); -extern TimeDelta get_cpu_time(); -extern void 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