Added getTimeAndDate() implementation.

svn-id: r31027
This commit is contained in:
Marcus Comstedt 2008-03-01 22:12:52 +00:00
parent 2db83c69e1
commit d5e09de48c
2 changed files with 8 additions and 0 deletions

View file

@ -116,6 +116,9 @@ class OSystem_Dreamcast : public OSystem, public FilesystemFactory {
// Delay for a specified amount of milliseconds
void delayMillis(uint msecs);
// Get the current time and date. Correspond to time()+localtime().
void getTimeAndDate(struct tm &t) const;
// Get the next event.
// Returns true if an event was retrieved.
bool pollEvent(Common::Event &event);

View file

@ -190,6 +190,11 @@ bool OSystem_Dreamcast::getFeatureState(Feature f)
}
}
void OSystem_Dreamcast::getTimeAndDate(struct tm &t) const {
time_t curTime;
time(&curTime);
t = *localtime(&curTime);
}
void dc_init_hardware()
{