Jump to content

C date and time functions

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fresheneesz (talk | contribs) at 17:05, 3 June 2006 (starting page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Member functions

asctime Convert tm structure to string
clock Return number of clock ticks since process start
ctime Convert time_t value to string
difftime Return difference between two times
gmtime Convert time_t value to tm structure as UTC time
localtime Convert time_t value to tm structure as local time
mktime Convert tm structure to time_t value
time Get current time

Member constants

CLK_TCK Constant that defines the number of clock ticks per second. Used by clock function.

Member types

clock_t and time_t Data types returned by clock and time functions respectivelly. They are generally defined as long int. tm Structure returned or used by asctime, gmtime, localtime and mktime. See tm structure definition.