# sys/time.h - [Overview](#section1315130326165629) - [Summary](#section772338641165629) - [Data Structures](#nested-classes) - [Macros](#define-members) - [Functions](#func-members) ## **Overview** **Related Modules:** [TIME](TIME.md) **Description:** Provides structures and functions related to the system time. You can read and write the system time and set timers. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures

Data Structure Name

Description

timeval

Describes a period of time, accurate to microseconds.

timespec

Describes a period of time, accurate to nanoseconds.

itimerval

Describes a timer.

timezone

Describes a time zone.

## Macros

Macro Name and Value

Description

ITIMER_REAL 0

Defines the timer that runs in real time.

## Functions

Function

Description

gettimeofday (struct timeval *__restrict value, void *__restrict ovalue)

int

Obtains the system time and time zone.

getitimer (int w, struct itimerval *old)

int

Obtains the value of an intermittent timer.

setitimer (int w, const struct itimerval *__restrict value, struct itimerval *__restrict ovalue)

int

Sets the value for a timer.

settimeofday (const struct timeval *tv, const struct timezone *tz)

int

Sets the system time and time zone.