123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #pragma once
- #include "openmpt/all/BuildSettings.hpp"
- #include <string>
- #include <time.h>
- OPENMPT_NAMESPACE_BEGIN
- namespace mpt
- {
- namespace Date
- {
- #if defined(MODPLUG_TRACKER)
- #if MPT_OS_WINDOWS
- namespace ANSI
- {
- uint64 Now();
- mpt::ustring ToUString(uint64 time100ns);
- }
- #endif
- #endif
- class Unix
- {
- private:
- int64 Value;
- public:
- Unix();
- explicit Unix(int64 unixtime);
- operator int64 () const;
- public:
- static mpt::Date::Unix FromUTC(tm timeUtc);
- tm AsUTC() const;
- };
- mpt::ustring ToShortenedISO8601(tm date);
- }
- }
- #ifdef MODPLUG_TRACKER
- namespace Util
- {
- #if MPT_OS_WINDOWS
- class MultimediaClock
- {
- private:
- uint32 m_CurrentPeriod;
- private:
- void Init();
- void SetPeriod(uint32 ms);
- void Cleanup();
- public:
- MultimediaClock();
- MultimediaClock(uint32 ms);
- ~MultimediaClock();
- public:
-
-
-
- uint32 SetResolution(uint32 ms);
-
-
- uint32 GetResolution() const;
-
-
-
- uint32 Now() const;
-
-
-
- uint64 NowNanoseconds() const;
- };
- #endif
- }
- #endif
- OPENMPT_NAMESPACE_END
|