]> git.tdb.fi Git - libs/core.git/blob - source/time/windows/utils.cpp
Move non-oneliner functions out of RefPtr class declaration
[libs/core.git] / source / time / windows / utils.cpp
1 #include <windows.h>
2 #include "rawtime_private.h"
3 #include "timedelta.h"
4 #include "timestamp.h"
5 #include "utils.h"
6
7 namespace Msp {
8 namespace Time {
9
10 TimeStamp now()
11 {
12         FILETIME ft;
13         GetSystemTimeAsFileTime(&ft);
14         return TimeStamp(filetime_to_rawtime(ft));
15 }
16
17 TimeDelta get_cpu_time()
18 {
19         //XXX Figure out the function to use on Win32
20         return TimeDelta();
21 }
22
23 void sleep(const TimeDelta &d)
24 {
25         Sleep((DWORD)(d/msec));
26 }
27
28 } // namespace Time
29 } // namespace Msp