diff options
| author | Roy Marples <roy@marples.name> | 2008-11-27 09:45:31 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-11-27 09:45:31 +0000 |
| commit | cb9618ed639da252921e82f543b8ca3d38744679 (patch) | |
| tree | c3d682af6e161187fac49c6f378e396117870f30 | |
| parent | d009718fb2ce9f4cdae67bb3530e97b39304a377 (diff) | |
| download | dhcpcd-cb9618ed639da252921e82f543b8ca3d38744679.tar.xz | |
Fix warning of monotonic clock existence.
| -rw-r--r-- | common.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -201,9 +201,8 @@ get_monotonic(struct timeval *tp) if (posix_clock_set == 0) { if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { posix_clock = CLOCK_MONOTONIC; - clock_monotonic = 1; + clock_monotonic = posix_clock_set = 1; } - posix_clock_set = 1; } if (clock_monotonic) { @@ -225,9 +224,8 @@ get_monotonic(struct timeval *tp) if (posix_clock_set == 0) { if (mach_timebase_info(&info) == KERN_SUCCESS) { factor = (double)info.numer / (double)info.denom; - clock_monotonic = 1; + clock_monotonic = posix_clock_set = 1; } - posix_clock_set = 1; } if (clock_monotonic) { nano = mach_absolute_time(); |
