SimApi Timer setStartSystemTime

From SIMboxWiki
Jump to navigation Jump to search



Icon attributes.pngstatic void SimApi::Timer::setStartSystemTime(const _SYSTEMTIME &i_Time)

    Description

    Sets the start time of the session using standard SYSTEMTIME structure of Win32 API

    Parameters

    i_Time - The start time of the session

    Remarks
    

Sets the start time of the session using standard SYSTEMTIME structure of Win32 API. See SYSTEMTIME structure information in MSDN. In addition to simulation start time, GLOBAL_ATT_SESSION_START_SYSTEM_TIME_STRING will be updated.


    Code Sample
    

SYSTEMTIME	st;

// Set time to Thursday, 3 Dec 2009, 10:09:00:000
st.wYear         = 2009;
st.wMonth        = 12;   // December
st.wDayOfWeek    = 4;    // Thursday
st.wDay          = 3;
st.wHour         = 10;   // 10 AM
st.wMinute       = 9;
st.wSecond       = 0;
st.wMilliseconds = 0;

// Aply it to the simulation timer
SimApi::Timer::setStartSystemTime(st);


    See Also

     getStartSystemTime

     setEndSystemTime

    Related Links

     Recommended: Simulation Time Overview