00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "CArchTimeUnix.h"
00016 #if TIME_WITH_SYS_TIME
00017 # include <sys/time.h>
00018 # include <time.h>
00019 #else
00020 # if HAVE_SYS_TIME_H
00021 # include <sys/time.h>
00022 # else
00023 # include <time.h>
00024 # endif
00025 #endif
00026
00027
00028
00029
00030
00031 CArchTimeUnix::CArchTimeUnix()
00032 {
00033
00034 }
00035
00036 CArchTimeUnix::~CArchTimeUnix()
00037 {
00038
00039 }
00040
00041 double
00042 CArchTimeUnix::time()
00043 {
00044 struct timeval t;
00045 gettimeofday(&t, NULL);
00046 return (double)t.tv_sec + 1.0e-6 * (double)t.tv_usec;
00047 }