GetTimerMS added - get timer in millisec

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4386 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-01-27 17:59:12 +00:00
parent 52db9b039a
commit 5786b7ad1e
2 changed files with 11 additions and 0 deletions

View File

@ -28,6 +28,16 @@ unsigned int GetTimer(){
return (tv.tv_sec*1000000+tv.tv_usec);
}
// Returns current time in milliseconds
unsigned int GetTimerMS(){
struct timeval tv;
struct timezone tz;
// float s;
gettimeofday(&tv,&tz);
// s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec;
return (tv.tv_sec*1000+tv.tv_usec/1000);
}
static unsigned int RelativeTime=0;
// Returns time spent between now and last call in seconds

View File

@ -1,6 +1,7 @@
void InitTimer();
unsigned int GetTimer();
unsigned int GetTimerMS();
//int uGetTimer();
float GetRelativeTime();