Turnstone Operating System
Loading...
Searching...
No Matches
time.h File Reference

date and time functions header. More...

#include <types.h>

Classes

struct  timeparsed_t
 

Macros

#define ___TIME_H   0
 
#define TIME_TIMESTAMP_START_YEAR   1970
 
#define TIME_SECONDS_OF_MINUTE   60
 
#define TIME_SECONDS_OF_HOUR   3600
 
#define TIME_SECONDS_OF_DAY   86400
 
#define TIME_SECONDS_OF_MONTH   2629743
 
#define TIME_SECONDS_OF_YEAR   31556926
 
#define TIME_DAYS_AT_YEAR   365
 
#define TIME_DAYS_AT_LEAP_YEAR   366
 

Typedefs

typedef uint64_t time_t
 
typedef struct timeparsed_t timeparsed_t
 

Functions

time_t time (time_t *t)
 
time_t time_ns (time_t *t)
 gets current time in nanoseconds More...
 
timeparsed_ttimeparsed (timeparsed_t *tp)
 
time_t timeparsed_to_time (timeparsed_t *tp)
 
timeparsed_ttime_to_timeparsed (time_t t)
 
uint64_t rdtsc (void)
 

Variables

uint64_t TIME_EPOCH
 

Detailed Description

date and time functions header.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Function Documentation

◆ time_ns()

time_t time_ns ( time_t t)

gets current time in nanoseconds

Parameters
[out]tpointer to time_t
Returns
current time in nanoseconds