Changeset 8271c78 in network-game for common/Common.cpp
- Timestamp:
- Aug 1, 2013, 2:15:49 AM (11 years ago)
- Branches:
- master
- Children:
- f9cb9fb
- Parents:
- d05086b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Common.cpp
rd05086b r8271c78 6 6 #if defined WINDOWS 7 7 #include <Windows.h> 8 #elif defined LINUX9 #include <ctime>10 8 #endif 9 10 #include <ctime> 11 11 12 12 using namespace std; … … 42 42 43 43 string getCurrentDateTimeString() { 44 ostringstream timeString; 45 44 46 time_t millis = time(NULL); 45 47 struct tm *time = localtime(&millis); 46 48 47 ostringstream timeString;48 49 timeString << time->tm_hour << ":" << time->tm_min << ":"<< time->tm_sec << " " << (time->tm_mon+1) << "/" << time->tm_mday << "/" << (time->tm_year+1900); 49 50
Note:
See TracChangeset
for help on using the changeset viewer.