The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 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() is preferred over this function.

 FUTURE DIRECTIONS

None.

 SEE ALSO

ctime(), gettimeofday(), time(), <sys/timeb.h>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]