/* * Modification History * * 2001-November-7 Jason Rohrer * Created. * * 2002-April-11 Jason Rohrer * Added missing include, and fixed a bug. * * 2004-January-29 Jason Rohrer * Fixed so that 0-point of time is the same as on other platforms. */ #include "minorGems/system/Time.h" #include #include #include #include /** * Windows implementation of Time.h. * * The 0-point should match the ANSI standard. */ void Time::getCurrentTime( unsigned long *outSeconds, unsigned long *outMilliseconds ) { // get seconds using ANSI standard C call to ensure that the 0-point // matches the ANSI standard *outSeconds = (unsigned long)( time( NULL ) ); // get milliseconds using a win32 call SYSTEMTIME timeStruct; GetLocalTime( &timeStruct ); *outMilliseconds = (unsigned long)( timeStruct.wMilliseconds ); }