SimApi Timer setEndSystemTime

From SIMboxWiki
Jump to navigation Jump to search



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

    Description

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

    Parameters

    i_Time - The end time of the session

    Remarks
    

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


    Code Sample
    

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;

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


    See Also

     getEndSystemTime

     setStartSystemTime

    Related Links

     Recommended: Simulation Time Overview