Changeset 1409:9541a6d7f041
- Timestamp:
- 11/08/09 09:46:51 (2 years ago)
- Branch:
- default
- Location:
- sources
- Files:
-
- 3 edited
-
include/libdodo/toolsTime.h (modified) (1 diff)
-
include/libdodo/toolsTimeEx.h (modified) (1 diff)
-
src/toolsTime.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sources/include/libdodo/toolsTime.h
r1406 r1409 137 137 138 138 /** 139 * @return number of milliseconds from 00:00:00 UTC, January 1, 1970 till now 140 */ 141 static unsigned long millinow(); 142 143 /** 139 144 * @return dates of the week 140 145 * @param date defines timestamp in the weekv -
sources/include/libdodo/toolsTimeEx.h
r1406 r1409 43 43 TIMEEX_BYFORMAT, 44 44 TIMEEX_NOW, 45 TIMEEX_MILLINOW, 45 46 TIMEEX_MAKETIME, 46 47 }; -
sources/src/toolsTime.cc
r1406 r1409 34 34 #include <stdlib.h> 35 35 #include <errno.h> 36 #include <sys/time.h> 36 37 37 38 #include <libdodo/toolsTime.h> … … 96 97 //------------------------------------------------------------------- 97 98 99 unsigned long 100 tools::time::millinow() 101 { 102 timeval tv; 103 104 if (gettimeofday(&tv, NULL) == -1) 105 throw exception::basic(exception::MODULE_TOOLSTIME, TIMEEX_MILLINOW, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); 106 107 return 1000 * tv.tv_sec + tv.tv_usec / 1000; 108 } 109 110 //------------------------------------------------------------------- 111 98 112 long 99 113 tools::time::now()
Note: See TracChangeset
for help on using the changeset viewer.
