Crossplatform time/date?
Posted: 26 Feb 2007, 22:24
Hey, I was looking at log.cpp and was wondering why you guys don't use <ctime>?
Code: Select all
// Get the current system time
const time_t *t;
tm *date = localtime(t);
// Print the log entry
mLogFile << "["
<<date->tm_hour
<< ":"
<<date->tm_min
<< ":"
<<date->tm_sec
<< "]"
<< buf
<< std::endl;