Scroll to navigation

FTIME(3) Manual del Programador de Linux FTIME(3)

NOMBRE

ftime - devuelve fecha y hora

SINOPSIS

#include <sys/timeb.h>

int ftime(struct timeb *tp);

DESCRIPCIÓN

NOTE: This function is deprecated, and will be removed in a future version of the GNU C library. Use clock_gettime(2) instead.

This function returns the current time as seconds and milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). The time is returned in tp, which is declared as follows:


struct timeb {

time_t time;
unsigned short millitm;
short timezone;
short dstflag; };

Here time is the number of seconds since the Epoch, and millitm is the number of milliseconds since time seconds since the Epoch. The timezone field is the local timezone measured in minutes of time west of Greenwich (with a negative value indicating minutes east of Greenwich). The dstflag field is a flag that, if nonzero, indicates that Daylight Saving time applies locally during the appropriate part of the year.

POSIX.1-2001 says that the contents of the timezone and dstflag fields are unspecified; avoid relying on them.

VALOR DEVUELTO

This function always returns 0. (POSIX.1-2001 specifies, and some systems document, a -1 error return.)

ATRIBUTOS

Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

Interfaz Atributo Valor
ftime() Seguridad del hilo Multi-hilo seguro

CONFORME A

4.2BSD, POSIX.1-2001. POSIX.1-2008 elimina las especificaciones de ftime().

Esta función está obsoleta. No la utilice. Si es suficiente con el tiempo en segundos, puede usarse time(2), gettimeofday(2) da el tiempo en microsegundos; clock_gettime(3) da el tiempo en nanosegundos aunque no está disponible todavía en muchos sistemas.

ERRORES

Las primeras versiones de glibc2 contienen varios fallos y devuelven o en el campo millitm. Esta se subsanó en glibc 2.1.1.

VÉASE TAMBIÉN

gettimeofday(2), time(2)

COLOFÓN

Esta página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en https://www.kernel.org/doc/man-pages/.

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Gerardo Aburruzaga García <gerardo.aburruzaga@uca.es>, Juan Piernas <piernas@ditec.um.es>, Miguel Pérez Ibars <mpi79470@alu.um.es> y Marcos Fouces <marcos@debian.org>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org.

9 Febrero 2020 GNU