/// \brief Update the in-game time. /// /// Reads the system time, and applies the necessary offsets to calculate /// the in-game time. This is the stored, and can be accessed using getTime(). void WorldRouter::updateTime(const SystemTime & time) { double tmp_time = (double)(time.seconds() + timeoffset - m_initTime) + (double)time.microseconds()/1000000; m_realTime = tmp_time; }
double BaseWorld::getTime() const { SystemTime time; time.update(); return (double)(time.seconds() + timeoffset - m_initTime) + (double)time.microseconds()/1000000.; }