summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-05-21 10:04:05 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-05-31 14:56:46 +1000
commit8461c506b82abc5dc6da298efa25df3921044bc6 (patch)
treec56ce74151448fbe7bae9d9c1dbdb7cf3199be77
parentb4933cade41d2600ee41bfa19469d5b041186be0 (diff)
Push getting current time to frontend.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/synaptics-x11.c8
-rw-r--r--src/synaptics.c2
-rw-r--r--src/synaptics.h4
3 files changed, 13 insertions, 1 deletions
diff --git a/src/synaptics-x11.c b/src/synaptics-x11.c
index c0dbec0..0cf2d71 100644
--- a/src/synaptics-x11.c
+++ b/src/synaptics-x11.c
@@ -81,6 +81,14 @@ SynapticsMsg(SynapticsPrivate *priv, enum MessageType type, const char *format,
va_end(args);
}
+unsigned int
+SynapticsGetCurrentMillis(void)
+{
+ return GetTimeInMillis();
+}
+
+
+
static CARD32
X11TimerFunc(OsTimerPtr timer, CARD32 now, pointer arg)
{
diff --git a/src/synaptics.c b/src/synaptics.c
index 8d688a0..2af1fe5 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -801,7 +801,7 @@ SynapticsReadInput(SynapticsPrivate *priv)
}
if (newDelay)
- SetTimer(priv, GetTimeInMillis(), delay);
+ SetTimer(priv, SynapticsGetCurrentMillis(), delay);
}
static int
diff --git a/src/synaptics.h b/src/synaptics.h
index 7dd063a..e9a7c5d 100644
--- a/src/synaptics.h
+++ b/src/synaptics.h
@@ -63,6 +63,10 @@ struct SynapticsProtocolOperations* GetDeviceProtocolOps(SynapticsPrivate *priv,
const char *device,
char **used_device);
unsigned int SynapticsTimerFunc(SynapticsPrivate *priv, unsigned int now);
+/**
+ * Return the current time in milliseconds.
+ */
+unsigned int SynapticsGetCurrentMillis(void);
/**
* Post a button event of the given type.