[Mplayer-cvslog] CVS: main/linux timer.h,1.3,1.4 timer-lx.c,1.5,1.6
Arpi of Ize
arpi at mplayer.dev.hu
Sun Jan 27 18:59:23 CET 2002
Update of /cvsroot/mplayer/main/linux
In directory mplayer:/var/tmp.root/cvs-serv10522
Modified Files:
timer.h timer-lx.c
Log Message:
GetTimerMS added - get timer in millisec
Index: timer.h
===================================================================
RCS file: /cvsroot/mplayer/main/linux/timer.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- timer.h 19 Oct 2001 00:16:13 -0000 1.3
+++ timer.h 27 Jan 2002 17:59:12 -0000 1.4
@@ -1,6 +1,7 @@
void InitTimer();
unsigned int GetTimer();
+unsigned int GetTimerMS();
//int uGetTimer();
float GetRelativeTime();
Index: timer-lx.c
===================================================================
RCS file: /cvsroot/mplayer/main/linux/timer-lx.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- timer-lx.c 23 Nov 2001 18:25:32 -0000 1.5
+++ timer-lx.c 27 Jan 2002 17:59:12 -0000 1.6
@@ -28,6 +28,16 @@
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
More information about the MPlayer-cvslog
mailing list