scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

time.h.man (2225B)


      1 .TH time.h 3 scc\-VERSION
      2 .SH NAME
      3 time.h - time and date types and functions
      4 .SH SYNOPSIS
      5 
      6 #include <time.h>
      7 
      8 The time.h header declares the following functions:
      9 
     10 .nf
     11 char asctime(const struct tm *tm);
     12 clock_t clock(void);
     13 char ctime(const time_t *timep);
     14 double difftime(time_t t1, time_t t2);
     15 struct tm *gmtime(const time_t *timep);
     16 struct tm *localtime(const time_t *timep);
     17 time_t mktime(struct tm *tm);
     18 size_t strftime(char *restrict, size_t, const char *restrict,
     19                 const struct tm *restrict);
     20 time_t time(time_t *timer);
     21 .fi
     22 .SH DESCRIPTION
     23 The time.h header defines the following macros:
     24 
     25 .B NULL
     26 
     27 An implementation-defined null pointer constant,
     28 identical to the one defined in stddef.h.
     29 
     30 .B CLOCKS_PER_SEC
     31 
     32 The number of clock ticks per second,
     33 used to convert the value returned by
     34 .BR clock ()
     35 to seconds. Its type is
     36 .IR clock_t .
     37 
     38 The time.h header defines the types
     39 .BR clock_t ,
     40 .BR size_t ,
     41 and
     42 .BR time_t .
     43 
     44 The time.h header declares the
     45 .B tm
     46 structure,
     47 which holds a broken-down representation of time
     48 and contains at least the following members:
     49 
     50 .nf
     51 int tm_sec	Seconds [0,60]
     52 int tm_min	Minutes [0,59]
     53 int tm_hour	Hour [0,23]
     54 int tm_mday	Day of month [1,31]
     55 int tm_mon	Month of year [0,11]
     56 int tm_year	Years since 1900
     57 int tm_wday	Day of week [0,6] (Sunday = 0)
     58 int tm_yday	Day of year [0,365]
     59 int tm_isdst	Daylight Savings flag
     60 .fi
     61 
     62 The members of the
     63 .I tm
     64 structure are:
     65 .TP 10
     66 tm_sec
     67 Seconds elapsed after the minute, normally 0 to 59,
     68 but up to 60 to accommodate leap seconds.
     69 .TP
     70 tm_min
     71 Minutes elapsed after the hour, in the range 0 to 59.
     72 .TP
     73 tm_hour
     74 Hours elapsed since midnight, in the range 0 to 23.
     75 .TP
     76 tm_mday
     77 The calendar day of the month, in the range 1 to 31.
     78 .TP
     79 tm_mon
     80 Months elapsed since January, in the range 0 to 11.
     81 .TP
     82 tm_year
     83 Years elapsed since 1900.
     84 .TP
     85 tm_wday
     86 Days elapsed since Sunday, in the range 0 to 6.
     87 .TP
     88 tm_yday
     89 Days elapsed since January 1st, in the range 0 to 365.
     90 .TP
     91 tm_isdst
     92 A flag indicating whether daylight saving time applies.
     93 Positive if in effect, zero if not, and negative if unknown.
     94 .SH STANDARDS
     95 ISO/IEC 9899:1999 Section 7.23.1 Paragraph 1,2,3,4
     96 .SH SEE ALSO
     97 .BR clock (3)
     98 .BR ctime (3)
     99 .BR difftime (3)
    100 .BR strftime (3)
    101 .BR time (3)