diff options
Diffstat (limited to 'src/os/os_clock.c')
-rw-r--r-- | src/os/os_clock.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/os/os_clock.c b/src/os/os_clock.c index 25eeb704..78f1c8df 100644 --- a/src/os/os_clock.c +++ b/src/os/os_clock.c @@ -1,7 +1,7 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015 Oracle and/or its affiliates. All rights reserved. * * $Id$ */ @@ -14,11 +14,15 @@ * __os_gettime -- * Return the current time-of-day clock in seconds and nanoseconds. * - * PUBLIC: void __os_gettime __P((ENV *, db_timespec *, int)); + * If you want the time of day, pass 0 in the monotonic argument. If you pass + * non-zero, you might get time-of-day or you might get a non-decreasing number + * which is unrelated to the time of day, such as the seconds since system boot. + * + * PUBLIC: void __os_gettime __P((const ENV *, db_timespec *, int)); */ void __os_gettime(env, tp, monotonic) - ENV *env; + const ENV *env; db_timespec *tp; int monotonic; { @@ -35,7 +39,6 @@ __os_gettime(env, tp, monotonic) RETRY_CHK((clock_gettime( CLOCK_REALTIME, (struct timespec *)tp)), ret); - RETRY_CHK((clock_gettime(CLOCK_REALTIME, (struct timespec *)tp)), ret); if (ret != 0) { sc = "clock_gettime"; goto err; @@ -69,5 +72,5 @@ __os_gettime(env, tp, monotonic) return; err: __db_syserr(env, ret, "%s", sc); - (void)__env_panic(env, __os_posix_err(ret)); + (void)__env_panic((ENV *) env, __os_posix_err(ret)); } |