*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> ftime (2)              
Title
Content
Arch
Section
 

Contents


 ftime(2)                                                           ftime(2)




 NAME    [Toc]    [Back]
      ftime - get date and time more precisely

 SYNOPSIS    [Toc]    [Back]
      #include <sys/timeb.h>

      int ftime(struct timeb *tp);

    Remarks    [Toc]    [Back]
      This facility is provided for backwards compatibility with Version 7
      systems.  Either time() or gettimeofday() should be used in new
      programs.

 DESCRIPTION    [Toc]    [Back]
      ftime() fills in a structure pointed to by its argument, as defined by
      <sys/timeb.h>:

           /*
            * Structure returned by ftime system call
            */
           struct timeb {
               time_t         time;
               unsigned short millitm;
               short          timezone;
               short          dstflag;
           };

      The structure contains the time in seconds since 00:00:00 UTC
      (Coordinated Universal Time), January 1, 1970, up to 1000 milliseconds
      of more-precise interval, the local timezone (measured in minutes of
      time westward from UTC), and a flag that, if nonzero, indicates that
      Daylight Saving time applies locally during the appropriate part of
      the year.  Consult gettimeofday(2) for more details on the meaning of
      the timezone field.

      ftime() can fail for exactly the same reasons as gettimeofday(2).

 WARNINGS    [Toc]    [Back]
      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.

 SEE ALSO    [Toc]    [Back]
      date(1), gettimeofday(2), stime(2), time(2), ctime(3C).

 STANDARDS CONFORMANCE    [Toc]    [Back]
      ftime(): XPG4.2


 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
gettimeofday Tru64 Gets and sets date and time and converts time between timeval and timeval64
ftime Tru64 Gets and sets date and time and converts time between timeval and timeval64
TIMEVAL64TO32 Tru64 Gets and sets date and time and converts time between timeval and timeval64
gettimeofday64 Tru64 Gets and sets date and time and converts time between timeval and timeval64
TIMEVAL32TO64 Tru64 Gets and sets date and time and converts time between timeval and timeval64
settimeofday Tru64 Gets and sets date and time and converts time between timeval and timeval64
settimeofday64 Tru64 Gets and sets date and time and converts time between timeval and timeval64
ntp_gettime Tru64 Get the date, time, and kernel time error values
ntpdate Tru64 set the date and time via NTP (Network Time Protocol)
ntpdate FreeBSD set the date and time via NTP
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service