diff options
author | Kay Sievers <kay@vrfy.org> | 2012-11-11 20:45:05 +0100 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-11-12 01:03:14 +0100 |
commit | 40fe8b11be9c1a1b38b91db097a5d6ebfa99304c (patch) | |
tree | 41183236fc9e51fe054afe378151c045893e75f8 /src/udev/udev-event.c | |
parent | 1707b36c6da447a42b0223840cf2eb84ca3f2f34 (diff) |
udev: use usec_t and now()
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r-- | src/udev/udev-event.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 2b9fdf6748..11540f7bc1 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -48,7 +48,7 @@ struct udev_event *udev_event_new(struct udev_device *dev) event->udev = udev; udev_list_init(udev, &event->run_list, false); event->fd_signal = -1; - event->birth_usec = now_usec(); + event->birth_usec = now(CLOCK_MONOTONIC); event->timeout_usec = 30 * 1000 * 1000; return event; } @@ -466,9 +466,9 @@ static void spawn_read(struct udev_event *event, int i; if (event->timeout_usec > 0) { - unsigned long long age_usec; + usec_t age_usec; - age_usec = now_usec() - event->birth_usec; + age_usec = now(CLOCK_MONOTONIC) - event->birth_usec; if (age_usec >= event->timeout_usec) { log_error("timeout '%s'\n", cmd); goto out; @@ -554,9 +554,9 @@ static int spawn_wait(struct udev_event *event, const char *cmd, pid_t pid) int fdcount; if (event->timeout_usec > 0) { - unsigned long long age_usec; + usec_t age_usec; - age_usec = now_usec() - event->birth_usec; + age_usec = now(CLOCK_MONOTONIC) - event->birth_usec; if (age_usec >= event->timeout_usec) timeout = 1000; else @@ -860,7 +860,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, if (event->dev_db != NULL && udev_device_get_usec_initialized(event->dev_db) > 0) udev_device_set_usec_initialized(event->dev, udev_device_get_usec_initialized(event->dev_db)); else if (udev_device_get_usec_initialized(event->dev) == 0) - udev_device_set_usec_initialized(event->dev, now_usec()); + udev_device_set_usec_initialized(event->dev, now(CLOCK_MONOTONIC)); /* (re)write database file */ udev_device_update_db(dev); |