Added getTimeAndDate() implementation.
svn-id: r31027
This commit is contained in:
parent
2db83c69e1
commit
d5e09de48c
2 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue