Retreiving system time.
-
-
Hi all, To reteive the system time i used CTime::GetCurrentTime(); When the return value is formatted I got the systm time in HOUR,MINUTES and SECONDS format..is there any function using which i can get 100th of a second also??? Thanks in advance Rajeev
you can call
GetAsSystemTime
function of CTime to get SYSTEMTIME structure used to store the time. from that you can access milliseconds and other information supported one more.GetAsDBTIMESTAMP
is also there you can get the fraction represents billionths of a second ranging from 0 to 999,999,999. Note This method is only available when OLEDB.h is included. See MSDN for more details. -- modified at 2:14 Friday 18th August, 2006SaRath.
_"Before you can learn to recognize what's wrong, you must learn to recognize what's right" - Raymond Chen."
-
Hi all, To reteive the system time i used CTime::GetCurrentTime(); When the return value is formatted I got the systm time in HOUR,MINUTES and SECONDS format..is there any function using which i can get 100th of a second also??? Thanks in advance Rajeev
Use
GetSystemTime(**LPSYSTEMTIME** lpSystemTime)
, which works with a pointer to SYSTEMTIME as argument:typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;SkyWalker