changeset 12031:0c2b8b731d42

Use system clock for xscreensaver pings (Tobias Diedrich).
author diego
date Tue, 16 Mar 2004 05:15:44 +0000
parents f95452116211
children 8cc4d4344c0f
files libvo/x11_common.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/x11_common.c	Mon Mar 15 15:29:15 2004 +0000
+++ b/libvo/x11_common.c	Tue Mar 16 05:15:44 2004 +0000
@@ -18,6 +18,7 @@
 #include "video_out.h"
 #include "aspect.h"
 #include "help_mp.h"
+#include "../osdep/timer.h"
 
 #include <X11/Xmd.h>
 #include <X11/Xlib.h>
@@ -1142,14 +1143,15 @@
 static Atom deactivate;
 static Atom screensaver;
 
-static float time_last;
+static unsigned int time_last;
 
-void xscreensaver_heartbeat(float time)
+void xscreensaver_heartbeat(void)
 {
+    unsigned int time = GetTimerMS();
     XEvent ev;
 
     if (mDisplay && xs_windowid &&
-	((time - time_last)>30 ||
+	((time - time_last)>30000 ||
 	 (time - time_last)<0)) {
 	time_last = time;