[Kazehakase-cvs] CVS update: kazehakase/src

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Wed Mar 14 13:21:23 JST 2007


Index: kazehakase/src/kz-autoscroller.c
diff -u kazehakase/src/kz-autoscroller.c:1.4 kazehakase/src/kz-autoscroller.c:1.5
--- kazehakase/src/kz-autoscroller.c:1.4	Wed Mar 14 11:24:41 2007
+++ kazehakase/src/kz-autoscroller.c	Wed Mar 14 13:21:23 2007
@@ -35,7 +35,6 @@
 #include <gtk/gtkmain.h>
 #include <stdlib.h>
 #include <math.h>
-#include <sys/time.h>
 
 typedef struct _KzAutoscrollerPriv KzAutoscrollerPriv;
 struct _KzAutoscrollerPriv {
@@ -310,7 +309,7 @@
 static gint
 kz_autoscroller_timeout_cb (gpointer data)
 {
-	struct timeval start_time, finish_time;
+	GTimeVal start_time, finish_time;
 	long elapsed_msecs;
 	KzAutoscroller *as = data;
 	KzAutoscrollerPriv *priv = KZ_AUTOSCROLLER_GET_PRIVATE (as);
@@ -353,7 +352,7 @@
 	if (!scroll_step_y_int && !scroll_step_x_int) return TRUE;
 	
 	/* get the time before we tell the embed to scroll */
-	gettimeofday (&start_time, NULL);
+	g_get_current_time(&start_time);
 
 	/* do scrolling, moving at a constart speed regardless of the
 	 * scrolling delay */
@@ -364,7 +363,7 @@
 	kz_embed_fine_scroll (priv->embed, scroll_step_x_int, scroll_step_y_int);
 
 	/* find out how long the scroll took */
-	gettimeofday (&finish_time, NULL);
+	g_get_current_time(&finish_time);
 	elapsed_msecs = (1000000L * finish_time.tv_sec + finish_time.tv_usec -
 			 1000000L * start_time.tv_sec - start_time.tv_usec) /
 			1000;


More information about the Kazehakase-cvs mailing list
Back to archive index