DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ftime(3C)


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.

Return value

Upon successful completion, the ftime function returns 0. Otherwise -1 is returned.

Usage

For portability to implementations conforming to earlier standards, time(2) is preferred over this function.

The millisecond value usually has a granularity greater than one due to the resolution of the system clock. Depending on any granularity (particularly a granularity of one) renders code non-portable.

Standards conformance

This routine conforms to X/Open System Interfaces and Headers, Issue 4, Version 2.

References

ctime(3C), gettimeofday(2), time(2)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004