/* Copyright 07/20/98 Sun Microsystems, Inc. All Rights Reserved */ #if !defined(__STD_CTIME) && !defined(__STD_TIME_H) #define __STD_CTIME #include #ifndef NULL #define NULL 0 #endif #define CLOCKS_PER_SEC 1000000 #if defined(__EXTENSIONS__) || ((__STDC__ - 0 == 0) && \ !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) && defined(__SunOS_5_7)) || \ (_POSIX_C_SOURCE > 2) #include #endif namespace std { // C++ Standard functions and types #if defined(_LP64) || defined(_I32LPx) typedef unsigned long size_t; /* size of something in bytes */ #else typedef unsigned size_t; /* (historical version) */ #endif // duplicate typedefs allowed in C++ typedef long clock_t; typedef long time_t; typedef int clockid_t; #ifndef _STRUCT_TM // needed for cwchar #define _STRUCT_TM struct tm { /* see ctime(3) */ int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; }; #endif extern "C" { extern clock_t clock(void); extern double difftime(time_t, time_t); extern time_t mktime(struct tm *); extern time_t time(time_t *); extern char *asctime(const struct tm *); extern char *ctime(const time_t *); extern struct tm *gmtime(const time_t *); extern struct tm *localtime(const time_t *); extern size_t strftime(char *, size_t, const char *, const struct tm *); } } /* namespace std */ #endif /* __STD_time */