Changeset 1707 for trunk/src/core
- Timestamp:
- Apr 20, 2010 9:52:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/RpLibrary.cc
r1527 r1707 27 27 #include <iterator> 28 28 #include <cctype> 29 30 #ifdef _POSIX_SOURCE 31 #include <sys/time.h> 32 #endif /* _POSIX_SOURCE */ 29 33 30 34 // no arg constructor … … 2200 2204 2201 2205 if (this->root) { 2206 #ifdef _POSIX_SOURCE 2207 // if the posix function gettimeofday is available, 2208 // we can get more precision on the time and more 2209 // unique filenames. 2210 struct timeval tv; 2211 gettimeofday(&tv,NULL); 2212 outputFile << "run" << tv.tv_sec << tv.tv_usec << ".xml"; 2213 #else 2202 2214 outputFile << "run" << (int)time(&t) << ".xml"; 2215 #endif 2203 2216 file.open(outputFile.str().c_str(),std::ios::out); 2204 2217
Note: See TracChangeset
for help on using the changeset viewer.