SimApi Timer seekToTime 2
Seeks to time using SYSTEMTIME structure - sets a new simulation time from mission start
i_Time - The new simulation time in SYSTEMTIME structure. The SYSTEMTIME value should be between start and end time of the mission.
The common used of this function is in playback mode, where a plugin can "jump" to a specific time in the session based on a user action or other logic. SeekToTime will publish a "TimeChanged" event with the new time values. For details about SYSTEMTIME structure see its information in MSDN. You can use overloaded function for seeking by seconds from mission start.
SYSTEMTIME st; // Set time to Thursday, 3 Dec 2009, 10:45:00:000 st.wYear = 2009; st.wMonth = 12; // December st.wDayOfWeek = 4; // Thursday st.wDay = 3; st.wHour = 10; // 10 AM st.wMinute = 45; st.wSecond = 0; st.wMilliseconds = 0; // Seek to that time within the session SimApi::Timer::seekToTime(st);