00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc 00008 * 123 Front Street West, Suite 1401 00009 * Toronto, Ontario 00010 * Canada M5J 2M2 00011 * 416-504-9876 00012 * 00013 * NAME: SYS_Time.h (SYS Library, C++) 00014 * 00015 * COMMENTS: Platform-independent time structures 00016 */ 00017 00018 #ifndef __SYS_TIME_H_INCLUDED__ 00019 #define __SYS_TIME_H_INCLUDED__ 00020 00021 #include "SYS_API.h" 00022 #include "SYS_Types.h" 00023 00024 #ifdef WIN32 00025 struct SYS_TimeVal 00026 { 00027 long tv_sec; /* seconds */ 00028 long tv_usec; /* and microseconds */ 00029 }; 00030 #else 00031 00032 #include <sys/time.h> 00033 00034 typedef struct timeval SYS_TimeVal; 00035 00036 #endif 00037 00038 // SYSgettimeofday() returns the time since the computer started. 00039 SYS_API int SYSgettimeofday(SYS_TimeVal *tval); 00040 00041 // Return the number of milliseconds since the computer was last started 00042 // this count wraps around every 49.7 days. The resolution on Windows is 00043 // about 1/18th of a second. 00044 SYS_API unsigned int SYSclock(); 00045 00046 #endif // __SYS_TIME_H_INCLUDED__
1.5.9