Changeset 8271c78 in network-game
- Timestamp:
- Aug 1, 2013, 2:15:49 AM (12 years ago)
- Branches:
- master
- Children:
- f9cb9fb
- Parents:
- d05086b
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
client/.gitignore
rd05086b r8271c78 7 7 gameClient 8 8 allegro.log 9 client.log -
client/Client/main.cpp
rd05086b r8271c78 20 20 #include <iostream> 21 21 #include <sstream> 22 #include <fstream> 22 23 #include <map> 23 24 … … 126 127 bool fullscreen = false; 127 128 debugging = false; 129 ofstream outputLog; 128 130 129 131 scoreBlue = 0; … … 136 138 return -1; 137 139 } 140 141 outputLog.open("client.log", ios::app); 142 outputLog << "Started client on " << getCurrentDateTimeString() << endl; 138 143 139 144 if (al_init_primitives_addon()) … … 496 501 al_destroy_display(display); 497 502 al_destroy_timer(timer); 498 503 504 outputLog << "Stopped client on " << getCurrentDateTimeString() << endl; 505 outputLog.close(); 506 499 507 return 0; 500 508 } -
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.