diff options
| author | Roy Marples <roy@marples.name> | 2008-07-24 14:30:36 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-07-24 14:30:36 +0000 |
| commit | 5fa0b31f1008b99c38637cbcccf8233b76e78b9b (patch) | |
| tree | 7053b82a5ab5875fa8a11d576fafee3ce24e0ea1 /common.c | |
| parent | b8b4be9a39e91342c91e493ce2e08c00d0177aa8 (diff) | |
| download | dhcpcd-5fa0b31f1008b99c38637cbcccf8233b76e78b9b.tar.xz | |
get_time -> clock_monotonic to be more descriptive.
Diffstat (limited to 'common.c')
| -rw-r--r-- | common.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -203,7 +203,7 @@ set_nonblock(int fd) * platforms. */ int -get_time(struct timeval *tp) +clock_monotonic(struct timeval *tp) { #if defined(_POSIX_MONOTONIC_CLOCK) && defined(CLOCK_MONOTONIC) struct timespec ts; @@ -232,11 +232,11 @@ get_time(struct timeval *tp) time_t uptime(void) { - struct timeval tp; + struct timeval tv; - if (get_time(&tp) == -1) + if (clock_monotonic(&tv) == -1) return -1; - return tp.tv_sec; + return tv.tv_sec; } int |
