(C) 1998 AROS - The Amiga Research OS
struct timeval { long tv_sec; // seconds long tv_usec; // microseconds };
struct timezone { int tz_minuteswest; // minutes west of Greenwich int tz_dsttime; // type of dst correction };
With daylight savings times defined as follows :
DST_NONE // not on dst DST_USA // USA style dst DST_AUST // Australian style dst DST_WET // Western European dst DST_MET // Middle European dst DST_EET // Eastern European dst DST_CAN // Canada DST_GB // Great Britain and Eire DST_RUM // Rumania DST_TUR // Turkey DST_AUSTALT // Australian style with shift in 1986
And the following macros are defined to operate on this :
timerisset(tv) - TRUE if tv contains a time
timercmp(tv1, tv2, cmp) - Return the result of the comparison "tv1 cmp tv2"
timerclear(tv) - Clear the timeval struct
struct timeval tv; // Get the current time and print it gettimeofday (&tv, NULL); printf ("Seconds = %ld, uSec = %ld\n", tv->tv_sec, tv->tv_usec);