1ftime(3C)                Standard C Library Functions                ftime(3C)
2
3
4

NAME

6       ftime - get date and time
7

SYNOPSIS

9       #include <sys/timeb.h>
10
11       int ftime(struct timeb *tp);
12
13

DESCRIPTION

15       The  ftime()  function  sets  the time and millitm members of the timeb
16       structure pointed to by tp. The structure is defined  in  <sys/timeb.h>
17       and contains the following members:
18
19         time_t           time;
20         unsigned short   millitm;
21         short            timezone;
22         short            dstflag;
23
24
25
26       The  time and millitm members contain the seconds and milliseconds por‐
27       tions, respectively, of the current time in seconds since 00:00:00  UTC
28       (Coordinated Universal Time), January 1, 1970.
29
30
31       The  timezone  member  contains the local time zone. The dstflag member
32       contains a flag that, if non-zero, indicates that Daylight Saving  time
33       applies locally during the appropriate part of the year.
34
35
36       The  contents of the timezone and dstflag members of tp after a call to
37       ftime() are unspecified.
38

RETURN VALUES

40       Upon successful completion, the ftime() function returns  0.  Otherwise
41       −1 is returned.
42

ERRORS

44       No errors are defined.
45

USAGE

47       For  portability  to  implementations conforming to earlier versions of
48       this document, time(2) is preferred over this function.
49
50
51       The millisecond value usually has a granularity greater than one due to
52       the resolution of the system clock.  Depending on any granularity (par‐
53       ticularly a granularity of one) renders code non-portable.
54

ATTRIBUTES

56       See attributes(5) for descriptions of the following attributes:
57
58
59
60
61       ┌─────────────────────────────┬─────────────────────────────┐
62ATTRIBUTE TYPE               ATTRIBUTE VALUE              
63       ├─────────────────────────────┼─────────────────────────────┤
64       │Interface Stability          │Standard                     │
65       └─────────────────────────────┴─────────────────────────────┘
66

SEE ALSO

68       date(1),    time(2),    ctime(3C),    gettimeofday(3C),    timezone(4),
69       attributes(5), standards(5)
70
71
72
73SunOS 5.11                        24 Jul 2002                        ftime(3C)
Impressum