OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [time/] [time.tex] - Diff between revs 1010 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 1010 Rev 1765
@node Timefns
@node Timefns
@chapter Time Functions (@file{time.h})
@chapter Time Functions (@file{time.h})
 
 
This chapter groups functions used either for reporting on time
This chapter groups functions used either for reporting on time
(elapsed, current, or compute time) or to perform calculations based
(elapsed, current, or compute time) or to perform calculations based
on time.
on time.
 
 
The header file @file{time.h} defines three types.  @code{clock_t} and
The header file @file{time.h} defines three types.  @code{clock_t} and
@code{time_t} are both used for representations of time particularly
@code{time_t} are both used for representations of time particularly
suitable for arithmetic.  (In this implementation, quantities of type
suitable for arithmetic.  (In this implementation, quantities of type
@code{clock_t} have the highest resolution possible on your machine,
@code{clock_t} have the highest resolution possible on your machine,
and quantities of type @code{time_t} resolve to seconds.)  @code{size_t}
and quantities of type @code{time_t} resolve to seconds.)  @code{size_t}
is also defined if necessary for quantities representing sizes.
is also defined if necessary for quantities representing sizes.
 
 
@file{time.h} also defines the structure @code{tm} for the traditional
@file{time.h} also defines the structure @code{tm} for the traditional
representation of Gregorian calendar time as a series of numbers, with
representation of Gregorian calendar time as a series of numbers, with
the following fields:
the following fields:
 
 
@table @code
@table @code
@item tm_sec
@item tm_sec
Seconds.
Seconds.
 
 
@item tm_min
@item tm_min
Minutes.
Minutes.
 
 
@item tm_hour
@item tm_hour
Hours.
Hours.
 
 
@item tm_mday
@item tm_mday
Day.
Day.
 
 
@item tm_mon
@item tm_mon
Month.
Month.
 
 
@item tm_year
@item tm_year
Year (since 1900).
Year (since 1900).
 
 
@item tm_wday
@item tm_wday
Day of week: the number of days since Sunday.
Day of week: the number of days since Sunday.
 
 
@item tm_yday
@item tm_yday
Number of days elapsed since last January 1.
Number of days elapsed since last January 1.
 
 
@item tm_isdst
@item tm_isdst
Daylight Savings Time flag: positive means DST in effect, zero means DST
Daylight Savings Time flag: positive means DST in effect, zero means DST
not in effect, negative means no information about DST is available.
not in effect, negative means no information about DST is available.
@end table
@end table
 
 
@menu
@menu
* asctime::     Format time as string
* asctime::     Format time as string
* clock::       Cumulative processor time
* clock::       Cumulative processor time
* ctime::       Convert time to local and format as string
* ctime::       Convert time to local and format as string
* difftime::    Subtract two times
* difftime::    Subtract two times
* gmtime::      Convert time to UTC (GMT) traditional representation
* gmtime::      Convert time to UTC (GMT) traditional representation
* localtime::   Convert time to local representation
* localtime::   Convert time to local representation
* mktime::      Convert time to arithmetic representation
* mktime::      Convert time to arithmetic representation
* strftime::    Flexible calendar time formatter
* strftime::    Flexible calendar time formatter
* time::        Get current calendar time (as single number)
* time::        Get current calendar time (as single number)
@end menu
@end menu
 
 
@page
@page
@include time/asctime.def
@include time/asctime.def
 
 
@page
@page
@include time/clock.def
@include time/clock.def
 
 
@page
@page
@include time/ctime.def
@include time/ctime.def
 
 
@page
@page
@include time/difftime.def
@include time/difftime.def
 
 
@page
@page
@include time/gmtime.def
@include time/gmtime.def
 
 
@page
@page
@include time/lcltime.def
@include time/lcltime.def
 
 
@page
@page
@include time/mktime.def
@include time/mktime.def
 
 
@page
@page
@include time/strftime.def
@include time/strftime.def
 
 
@page
@page
@include time/time.def
@include time/time.def
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.