Time.h
-
time.h
time.h es un archivo de cabecera de la biblioteca estándar del lenguaje de programación C que contiene funciones para manipular y formatear la fecha y hora del sistema.
Contenido
Funciones
Nombre Descripción char * asctime(struct tm *)
Recibe una variable de tipo puntero a estructura tm ( struct tm*
) y devuelve una cadena de caracteres cuyo formato es:
"Www Mmm dd hh:mm:ss yyyy" (ej: Tue May 15 19:07:04 2008)clock_t clock (void)
Devuelve el número de pulsos de reloj desde que se inició el proceso char * ctime(time t *)
Recibe una variable de tipo puntero a time t
(time t*
) y devuelve una cadena con el mismo formato queasctime()
double difftime(time t, time t)
Recibe dos variables de tipo time t
, calcula su diferencia y devuelve el resultado (double
) expresado en segundos.struct tm *gmtime(time t *)
Recibe un puntero a una variable de tiempo ( time t*
) y devuelve su conversion como fecha/hora UTC astruct tm
a través de un puntero.struct tm *localtime(time t *)
Similar funcionalidad a gmtime()
, pero devuelve la conversión como fecha/hora LOCAL.time t mktime(struct tm *)
Inversamente a gmtime()
ylocaltime()
,l recibe un puntero astruct tm
(struct tm*
) y devuelve su conversión al tipotime t
.time t time(time t *)
Devuelve la fecha/hora ( time t
) actual o -1 en caso de no ser posible. Si el argumento que se le pasa no es NULL, también asigna la fecha/hora actual a dicho argumento.size_t strftime(char *,size_t,char *,struct tm *)
Formatea la información pasada mediante la estructura ( struct tm*
) mediante el formato indicado en una cadena (char*
) e imprime el resultado sobre otra cadena (char*
) hasta un límite de caracteres (size_t
).Constantes
Nombre Descripción CLK_PER_SEC
Constante que define el número de pulsos de reloj por segundo; usado por la función clock()
CLOCKS_PER_SEC
nombre alternativo para CLK_PER_SEC
usado en su lugar en algunas bibliotecasCLK_TCK
usualmente una macro para CLK_PER_SEC
Tipos de datos
Nombre Descripción clock_t
tipo de dato devuelto por clock()
, generalmente unlong int
time t
tipo de dato devuelto por time()
, generalmente unlong int
struct tm
representación del tiempo en formato de calendario (fecha/hora) Fecha (día/hora) de calendario
La fecha de calendario se representa como la estructura
struct tm
, que consta de los siguientes atributos:Atributo Descripción int tm_hour
hora (0 - 23) int tm_isdst
Horario de verano enabled/disabled int tm_mday
día del mes (1 - 31) int tm_min
minutos (0 - 59) int tm_mon
mes (0 - 11, 0 = Enero) int tm_sec
segundos (0 - 60) int tm_wday
día de la semana (0 - 6, 0 = domingo) int tm_yday
día del año (0 - 365) int tm_year
año desde 1900 Véase también
Referencias
Categorías: Biblioteca estándar de C | Cabeceras de C
Wikimedia foundation. 2010.
Mira otros diccionarios:
Time — Time, n.; pl. {Times}. [OE. time, AS. t[=i]ma, akin to t[=i]d time, and to Icel. t[=i]mi, Dan. time an hour, Sw. timme. [root]58. See {Tide}, n.] 1. Duration, considered independently of any system of measurement or any employment of terms which… … The Collaborative International Dictionary of English
Time — • Article explores two questions, What are the notes, or elements, contained in the subjective representation of time? and To what external reality does this representation correspond? Catholic Encyclopedia. Kevin Knight. 2006. Time Time … Catholic encyclopedia
time — [tīm] n. [ME < OE tima, prob. < IE * dī men < base * dā(i) , to part, divide up > TIDE1] I duration; continuance 1. indefinite, unlimited duration in which things are considered as happening in the past, present, or future; every… … English World dictionary
Time's Up! — is a grassroots environmental group that seeks to promote a more sustainable, less toxic New York City. For 20 years, it has been committed to improving the environment by empowering individuals to become active in their community. In New York… … Wikipedia
TIME — (magazine) Pour les articles homonymes, voir Time. Time Magazine {{{nomorigine}}} … Wikipédia en Français
time — ► NOUN 1) the indefinite continued progress of existence and events in the past, present, and future, regarded as a whole. 2) a point of time as measured in hours and minutes past midnight or noon. 3) the favourable or appropriate moment to do… … English terms dictionary
TIME — Erstausgabe 1923 Beschreibung Nachrichtenmagazi … Deutsch Wikipedia
Time — Time … Deutsch Wikipedia
Time.h — Dans les langages C et C++, time.h est le fichier d en tête de la bibliothèque standard C qui déclare des fonctions fournissant de manière standardisée des primitives de manipulation des dates et leur formatage. Sommaire 1 Fonctions 2 Constantes… … Wikipédia en Français
Time UK — is a computer retailer set up by the people behind the failed Time Computer Systems.The company is based within the main factory offices at Time Technology Park in Simonstone, near Burnley in Lancashire. The company specializes in providing… … Wikipedia