time_t(3type)

time_t3type

Integer time

Usage

#include <time.h>

typedef /* ... */ time_t;

#include <sys/types.h>

typedef /* ... */ suseconds_t; typedef /* ... */ useconds_t;

Library

Standard C library (libc)

Overview

time_t

Used for time in seconds. According to POSIX, it is an integer type of at least 64 bits.

suseconds_t

Used for time in microseconds. It is a signed integer type capable of storing values at least in the range [-1, 1000000].

useconds_t

Used for time in microseconds. It is an unsigned integer type capable of storing values at least in the range [0, 1000000].

Notes

On some architectures, the width of time_t can be controlled with the feature test macro _TIME_BITS. See feature_test_macros(7).

The following headers also provide time_t: <sched.h>, <sys/msg.h>, <sys/select.h>, <sys/sem.h>, <sys/shm.h>, <sys/stat.h>, <sys/time.h>, <sys/types.h>, and <utime.h>.

The following headers also provide suseconds_t: <sys/select.h> and <sys/time.h>.

The following headers also provided useconds_t: <unistd.h>.

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

Standards

time_t

C11, POSIX.1-2024.

suseconds_t

POSIX.1-2024.

useconds_t

None.

History

time_t

C89, POSIX.1-1988.

suseconds_t

SUSv2, POSIX.1-2001 XSI, POSIX.1-2024.

useconds_t

SUSv1, POSIX.1-2001 XSI. Removed in POSIX.1-2008.

Header files

<sched.h> defines time_t since POSIX.1-2008.

time_t

POSIX.1-2024 requires that the width of time_t is at least 64 bits; however, some systems still use 32 bits by default.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.