timers: Remove GetRelativeTime()
[mplayer/glamo.git] / osdep / timer-win2.c
blob43c4b07fa989baeb0a53b169c4fe0e7132ff4d3a
1 // Precise timer routines for WINDOWS
3 #include <windows.h>
4 #include <mmsystem.h>
5 #include "timer.h"
7 const char timer_name[] = "Windows native";
9 // Returns current time in microseconds
10 unsigned int GetTimer(){
11 return timeGetTime() * 1000;
14 // Returns current time in milliseconds
15 unsigned int GetTimerMS(){
16 return timeGetTime() ;
19 int usec_sleep(int usec_delay){
20 // Sleep(0) won't sleep for one clocktick as the unix usleep
21 // instead it will only make the thread ready
22 // it may take some time until it actually starts to run again
23 if(usec_delay<1000)usec_delay=1000;
24 Sleep( usec_delay/1000);
25 return 0;
28 void InitTimer(){