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 * time -- 15 * 16 * PUBLIC: #ifndef HAVE_TIME 17 * PUBLIC: time_t time __P((time_t *)); 18 * PUBLIC: #endif 19 */ 20time_t 21time(nowp) 22 time_t *nowp; 23{ 24 db_timespec t; 25 time_t res; 26 27 __os_gettime(NULL, &t, 0); 28 29 res = t.tv_sec + t.tv_nsec / NS_PER_SEC; 30 31 if (nowp != NULL) 32 *nowp = res; 33 return (res); 34} 35