PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
clock.h File Reference
#include <kernel/cpu/interrupt.h>
#include <kernel/sync/lock.h>
#include <sys/proc.h>
#include <time.h>
Include dependency graph for clock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  clock_source_t
 Clock source structure. More...
 

Macros

#define CLOCK_MAX_SOURCES   8
 Maximum amount of system timer sources.
 

Typedefs

typedef struct cpu cpu_t
 

Functions

uint64_t clock_source_register (const clock_source_t *source)
 Register a system timer source.
 
void clock_source_unregister (const clock_source_t *source)
 Unregister a system timer source.
 
clock_t clock_uptime (void)
 Retrieve the time in nanoseconds since boot.
 
time_t clock_epoch (void)
 Retrieve the seconds since the unix epoch.
 
void clock_wait (clock_t nanoseconds)
 Wait for a specified number of nanoseconds.
 

Typedef Documentation

◆ cpu_t

typedef struct cpu cpu_t

Definition at line 9 of file clock.h.