scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

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