objc

Data Structures | Typedefs | Functions
date.h File Reference

Date and Time management functions. More...

#include <stdbool.h>
#include <stdint.h>
Include dependency graph for date.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sys_date_t
 Represents a system date and time structure. More...
 

Typedefs

typedef struct sys_date_t sys_date_t
 Represents a system date and time structure. More...
 

Functions

bool sys_date_get_now (sys_date_t *date)
 Gets the current system time. More...
 
bool sys_date_set_now (const sys_date_t *date)
 Sets the current system time. More...
 
bool sys_date_get_time_utc (sys_date_t *date, uint8_t *hours, uint8_t *minutes, uint8_t *seconds)
 Extracts time components from a sys_date_t structure. More...
 
bool sys_date_get_time_local (sys_date_t *date, uint8_t *hours, uint8_t *minutes, uint8_t *seconds)
 Extracts time components from a sys_date_t structure. More...
 
bool sys_date_get_date_utc (sys_date_t *date, uint16_t *year, uint8_t *month, uint8_t *day, uint8_t *weekday)
 Extracts date components from a sys_date_t structure. More...
 
bool sys_date_get_date_local (sys_date_t *date, uint16_t *year, uint8_t *month, uint8_t *day, uint8_t *weekday)
 Extracts date components from a sys_date_t structure. More...
 
bool sys_date_set_time_utc (sys_date_t *date, uint8_t hours, uint8_t minutes, uint8_t seconds)
 Sets time components in a sys_date_t structure, preserving the date and timezone offset. More...
 
bool sys_date_set_date_utc (sys_date_t *date, uint16_t year, uint8_t month, uint8_t day)
 Sets date components in a sys_date_t structure, preserving the time and timezone offset. More...
 
int64_t sys_date_compare_ns (const sys_date_t *start, const sys_date_t *end)
 Calculate the difference in nanoseconds between two sys_date_t structures. More...
 
uint64_t sys_date_get_timestamp ()
 Gets the number of milliseconds since the process started. More...
 

Detailed Description

Date and Time management functions.

Definition in file date.h.