NAME
ftime — get date
and time
SYNOPSIS
#include <sys/timeb.h> int ftime(struct timeb *tp);
DESCRIPTION
The ftime() function sets the time and millitm members of the timeb structure pointed to by tp to contain the seconds and milliseconds portions, respectively, of the current time in seconds since 00:00:00 UTC (Coordinated Universal Time), January 1, 1970. The contents of the timezone and dstflag members of tp after a call to ftime() are unspecified.
The system clock need not have millisecond granularity. Depending on any granularity (particularly a granularity of one) renders code non-portable.
RETURN VALUE
Upon successful completion, the ftime() function returns 0. Otherwise -1 is returned.
ERRORS
No errors are defined.
EXAMPLES
None.
APPLICATION USAGE
For portability to implementations conforming to earlier versions of this specification, time(3) is preferred over this function.
FUTURE DIRECTIONS
None.
SEE ALSO
ctime(3) , gettimeofday(3) , time(3) , <sys/timeb.h> .