DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ftime(S)


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(S) 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(S), gettimeofday(S), time(S)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005