resetting manifest requested domain to floor
[platform/upstream/db4.git] / os_brew / os_clock.c
1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2006-2009 Oracle.  All rights reserved.
5  *
6  * $Id$
7  */
8
9 #include "db_config.h"
10
11 #include "db_int.h"
12
13 /*
14  * __os_gettime --
15  *      Return the current time-of-day clock in seconds and nanoseconds.
16  */
17 void
18 __os_gettime(env, tp, monotonic)
19         ENV *env;
20         db_timespec *tp;
21         int monotonic;
22 {
23         /*
24          * Berkeley DB uses POSIX time values internally; convert a BREW time
25          * value into a POSIX time value.
26          */
27          tp->tv_sec =
28 #ifdef HAVE_BREW_SDK2
29             (time_t)GETTIMESECONDS() + BREW_EPOCH_OFFSET;
30 #else
31             (time_t)GETUTCSECONDS() + BREW_EPOCH_OFFSET;
32 #endif
33         tp->tv_nsec = 0;
34 }