[gnome-desktop] idle-monitor: Clarify unit for interval argument



commit 2b2ccd878d32ea78bf1060a6798fa374429af009
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Nov 12 19:10:01 2012 +0100

    idle-monitor: Clarify unit for interval argument
    
    It's in milliseconds, not seconds.

 libgnome-desktop/gnome-idle-monitor.c |    8 ++++----
 libgnome-desktop/gnome-idle-monitor.h |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libgnome-desktop/gnome-idle-monitor.c b/libgnome-desktop/gnome-idle-monitor.c
index 4a719a9..9d0d504 100644
--- a/libgnome-desktop/gnome-idle-monitor.c
+++ b/libgnome-desktop/gnome-idle-monitor.c
@@ -429,7 +429,7 @@ gnome_idle_monitor_new_for_device (GdkDevice *device)
 /**
  * gnome_idle_monitor_add_watch:
  * @monitor: A #GnomeIdleMonitor
- * @interval: The idletime interval, in milliseconds
+ * @interval_msec: The idletime interval, in milliseconds
  * @callback: (allow-none): The callback to call when the user has
  *     accumulated @interval seconds of idle time.
  * @user_data: (allow-none): The user data to pass to the callback
@@ -437,7 +437,7 @@ gnome_idle_monitor_new_for_device (GdkDevice *device)
  * @watch_id: (out): The watch ID
  *
  * Adds a watch for a specific idle time. The callback will be called
- * when the user has accumlated @interval seconds of idle time.
+ * when the user has accumlated @interval_msec milliseconds of idle time.
  * This function will return an ID in @watch_id that can either be passed
  * to gnome_idle_monitor_remove_watch(), or can be used to tell idle time
  * watches apart if you have more than one.
@@ -454,7 +454,7 @@ gnome_idle_monitor_new_for_device (GdkDevice *device)
  */
 void
 gnome_idle_monitor_add_watch (GnomeIdleMonitor	       *monitor,
-			      guint			interval,
+			      guint			interval_msec,
 			      GnomeIdleMonitorWatchFunc callback,
 			      gpointer			user_data,
 			      GDestroyNotify		notify,
@@ -469,7 +469,7 @@ gnome_idle_monitor_add_watch (GnomeIdleMonitor	       *monitor,
 	watch->callback = callback;
 	watch->user_data = user_data;
 	watch->notify = notify;
-	watch->xalarm = _xsync_alarm_set (monitor, XSyncPositiveTransition, interval);
+	watch->xalarm = _xsync_alarm_set (monitor, XSyncPositiveTransition, interval_msec);
 
 	g_hash_table_insert (monitor->priv->watches,
 			     GUINT_TO_POINTER (watch->id),
diff --git a/libgnome-desktop/gnome-idle-monitor.h b/libgnome-desktop/gnome-idle-monitor.h
index d482b32..f28e863 100644
--- a/libgnome-desktop/gnome-idle-monitor.h
+++ b/libgnome-desktop/gnome-idle-monitor.h
@@ -62,7 +62,7 @@ GnomeIdleMonitor * gnome_idle_monitor_new          (void);
 GnomeIdleMonitor * gnome_idle_monitor_new_for_device (GdkDevice *device);
 
 void               gnome_idle_monitor_add_watch    (GnomeIdleMonitor         *monitor,
-                                                    guint                     interval,
+                                                    guint                     interval_msec,
                                                     GnomeIdleMonitorWatchFunc callback,
                                                     gpointer                  user_data,
                                                     GDestroyNotify            notify,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]