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