Scroll to navigation

difftime(3) Library Functions Manual difftime(3)

NOMBRE

difftime - calcula la diferencia entre dos tiempos

BIBLIOTECA

Biblioteca Estándar C (libc, -lc)

SINOPSIS

#include <time.h>
double difftime(time_t time1, time_t time0);

DESCRIPCIÓN

The difftime() function returns the number of seconds elapsed between time time1 and time time0, represented as a double. Each of the times is specified in calendar time, which means its value is a measurement (in seconds) relative to the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

ATRIBUTOS

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

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

ESTÁNDARES

POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.

NOTAS

En un sistema POSIX, time_t es un tipo aritmético, y simplemente se podría definir


#define difftime(t1,t0) (double)(t1 - t0)

cuando un posible desbordamiento por arriba de la resta no suponga una preocupación.

VÉASE TAMBIÉN

date(1), gettimeofday(2), time(2), ctime(3), gmtime(3), localtime(3)

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Sebastian Desimone <chipy@argenet.com.ar> y Gerardo Aburruzaga García <gerardo.aburruzaga@uca.es>

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.

29 Diciembre 2022 Páginas de manual de Linux 6.03