summaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-07-24 14:30:36 +0000
committerRoy Marples <roy@marples.name>2008-07-24 14:30:36 +0000
commit5fa0b31f1008b99c38637cbcccf8233b76e78b9b (patch)
tree7053b82a5ab5875fa8a11d576fafee3ce24e0ea1 /common.c
parentb8b4be9a39e91342c91e493ce2e08c00d0177aa8 (diff)
downloaddhcpcd-5fa0b31f1008b99c38637cbcccf8233b76e78b9b.tar.xz
get_time -> clock_monotonic to be more descriptive.
Diffstat (limited to 'common.c')
-rw-r--r--common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common.c b/common.c
index 8bc2b781..71095ebe 100644
--- a/common.c
+++ b/common.c
@@ -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