Implemented OSystem_SDL::getTimeAndDate (identical to OSystem::getTimeAndDate, which will eventually be REMOVED -- all porters should copy this change, if they haven't already)

svn-id: r31112
This commit is contained in:
Max Horn 2008-03-12 18:36:51 +00:00
parent 7288b92d0d
commit 6b3b7a5dc2
2 changed files with 8 additions and 0 deletions

View file

@ -34,6 +34,8 @@
#include "icons/scummvm.xpm"
#include <time.h> // for getTimeAndDate()
//#define SAMPLES_PER_SEC 11025
#define SAMPLES_PER_SEC 22050
//#define SAMPLES_PER_SEC 44100
@ -216,6 +218,11 @@ void OSystem_SDL::delayMillis(uint msecs) {
SDL_Delay(msecs);
}
void OSystem_SDL::getTimeAndDate(struct tm &t) const {
time_t curTime = time(0);
t = *localtime(&curTime);
}
Common::TimerManager *OSystem_SDL::getTimerManager() {
assert(_timer);
return _timer;