CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
time.h File Reference

POSIX time definitions. More...

#include <cdefs.h>
#include <stdint.h>

Go to the source code of this file.

Classes

struct  timeval

Functions

__cheriot_libcall int gettimeofday (struct timeval *__restrict tp, void *__restrict tzp)
 Get the current wall-clock time.

Detailed Description

POSIX time definitions.

This is not a complete implementation of the POSIX spec. The following are not implemented in CHERIoT RTOS:

  • FD_CLR(), FD_ISSET(), FD_SET(), FD_ZERO(), FD_SETSIZE, and fd_set, used for select.
  • select is not implemented because we do not have the POSIX file descriptor abstraction, use the APIs in multiwaiter.h to wait for multiple event sources.
  • utimes, which depends on a filesystem.
  • getitimer and setitimer`, which are deprecated in POSIX. */

The names in this file come from C or POSIX and so do not correspond to our naming scheme. This header is expected to be included in C, so should also not provide warnings about void in function parameter lists. NOLINTBEGIN(readability-identifier-naming,modernize-redundant-void-arg)

/ Type for holding seconds typedef int64_t time_t; / Type for holding microseconds up to one second, which requires 20 bits. typedef uint32_t suseconds_t;

/** Type used for time values as seconds and microseconds.

Definition in file time.h.

Function Documentation

◆ gettimeofday()

__cheriot_libcall int gettimeofday ( struct timeval *__restrict tp,
void *__restrict tzp )

Get the current wall-clock time.

The time-zone parameter is unused.