diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
---|---|---|
committer | <> | 2015-03-17 16:26:24 +0000 |
commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /src/os/os_clock.c | |
parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
download | berkeleydb-master.tar.gz |
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)); } |