diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-07-14 18:45:13 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-08-05 12:26:54 +0100 |
commit | e9508bf5af6fd5d618bbbb0e1a8c7791a26e3acc (patch) | |
tree | 2c3c619d1b733070ae9dcefb8cde1ca4e8efa4ef /dbus | |
parent | 0c4a2087c6ae734405649793327f371771f990db (diff) | |
download | dbus-e9508bf5af6fd5d618bbbb0e1a8c7791a26e3acc.tar.gz |
_dbus_get_current_time: move struct timeval into the non-monotonic branch
It's only used there.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/dbus-sysdeps-unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index f9315702..7a1eb27b 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -2493,8 +2493,6 @@ void _dbus_get_current_time (long *tv_sec, long *tv_usec) { - struct timeval t; - #ifdef HAVE_MONOTONIC_CLOCK struct timespec ts; clock_gettime (CLOCK_MONOTONIC, &ts); @@ -2504,6 +2502,8 @@ _dbus_get_current_time (long *tv_sec, if (tv_usec) *tv_usec = ts.tv_nsec / 1000; #else + struct timeval t; + gettimeofday (&t, NULL); if (tv_sec) |