.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified by Michael Haardt .\" Modified Sat Jul 24 14:13:40 1993 by Rik Faith .\" Additions by Joseph S. Myers , 970909 .\" Translated into Spanish Fri Feb 6 1998 by Gerardo Aburruzaga .\" García .\" Translation revised April 27 1998 by Juan Piernas .\" .TH TIME 2 "9 septiembre 1997" "Linux 2.0.30" "Manual del Programador de Linux" .SH NOMBRE time \- obtiene el tiempo de calendario, en segundos .SH SINOPSIS .B #include .sp .BI "time_t time(time_t *" t ); .SH DESCRIPCIÓN \fBtime\fP devuelve el tiempo transcurrido, medido en segundos, desde `la Época': las 0 horas 0 minutos 0 segundos, tiempo universal coordinado, del 1 de enero de 1970. Esta medida se llama el ``tiempo de calendario''. Si .I t no es el puntero nulo, el valor devuelto también se guarda en la zona de memoria a la que apunte .IR t . .SH "VALOR DEVUELTO" En caso de éxito se devuelve el tiempo transcurrido, en segundos, desde la Época. En caso de error, se devuelve ((time_t)\-1) y se asigna a la variable \fIerrno\fP un valor apropiado. .SH ERRORES .TP .B EFAULT .I t apunta fuera de su espacio de direcciones accesible. .SH OBSERVACIONES POSIX.1 define el valor .I segundos desde la Época como el número de segundos transcurridos entre un instante específico y la Época, calculados a partir del Tiempo Coordinado Universal (UTC) según una fórmula que simplifica la conversión ignorando los segundos de salto y suponiendo que todos los años divisibles por 4 son bisiestos. Este valor no es el mismo que el número real de segundos transcurrido entre dicho instante y la Época debido a los segundos de salto y debido a que no se requiere que los relojes estén sincronizados con una referencia estándar. La intención es que la interpretación de los valores .I segundos desde la Época sea consistente; vea POSIX.1 Anexo B 2.2.2 para una explicación más amplia. .SH "CONFORME A" SVr4, SVID, POSIX, X/OPEN, BSD 4.3 y C ANSI. .br Bajo BSD 4.3, esta llamada se considera anticuada, pues se tiene .BR gettimeofday (2), que proporciona un resultado más preciso. POSIX no especifica ninguna condición de error. .SH "VÉASE TAMBIÉN" .BR ctime (3), .BR date (1), .BR ftime (3), .BR gettimeofday (2)