diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_time.c | 4 | ||||
-rw-r--r-- | sys/sys/_time.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 8193c4eda43..61a9b559e5c 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_time.c,v 1.99 2017/01/24 00:58:55 mpi Exp $ */ +/* $OpenBSD: kern_time.c,v 1.100 2017/12/18 05:51:53 cheloha Exp $ */ /* $NetBSD: kern_time.c,v 1.20 1996/02/18 11:57:06 fvdl Exp $ */ /* @@ -124,6 +124,7 @@ clock_gettime(struct proc *p, clockid_t clock_id, struct timespec *tp) bintime2timespec(&bt, tp); break; case CLOCK_MONOTONIC: + case CLOCK_BOOTTIME: nanouptime(tp); break; case CLOCK_PROCESS_CPUTIME_ID: @@ -223,6 +224,7 @@ sys_clock_getres(struct proc *p, void *v, register_t *retval) switch (clock_id) { case CLOCK_REALTIME: case CLOCK_MONOTONIC: + case CLOCK_BOOTTIME: case CLOCK_UPTIME: case CLOCK_PROCESS_CPUTIME_ID: case CLOCK_THREAD_CPUTIME_ID: diff --git a/sys/sys/_time.h b/sys/sys/_time.h index e1882122275..a8ac94e3a35 100644 --- a/sys/sys/_time.h +++ b/sys/sys/_time.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _time.h,v 1.8 2016/09/03 15:06:06 akfaew Exp $ */ +/* $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -37,6 +37,7 @@ #define CLOCK_MONOTONIC 3 #define CLOCK_THREAD_CPUTIME_ID 4 #define CLOCK_UPTIME 5 +#define CLOCK_BOOTTIME 6 #if __BSD_VISIBLE /* |