Syntax
#include <sys\timeb.h> #include <sys\types.h> void _ftime(struct timeb *timeptr);Description
time
There is no return value.
This example polls the system clock, converts the current time to a character string, prints the string, and saves the time data in the structure timebuffer.
#include <sys\types.h>#include <sys\timeb.h>
#include <stdio.h>
#include <time.h>
int main(void)
{
struct timeb timebuffer;
_ftime(&timebuffer);
printf("the time is %s\n", ctime(&(timebuffer.time)));
return 0;
/****************************************************************************
The output should be similar to:
the time is Thu May 16 16:08:17 1995
****************************************************************************/
}
Related Information