Dreambox C/C++ SDK v1.0.0
C/C++ SDK for creating Dreambox games
Loading...
Searching...
No Matches
db_clock.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  clock_DateTime
 Represents date & time values for display. More...
 

Functions

uint64_t clock_getTimestamp ()
 Get the current timestamp. More...
 
void clock_timestampToDatetime (uint64_t timestamp, clock_DateTime *dateTime)
 Convert a timestamp to a datetime. More...
 
uint64_t clock_datetimeToTimestamp (const clock_DateTime *dateTime)
 Convert a datetime to a timestamp. More...
 

Function Documentation

◆ clock_datetimeToTimestamp()

uint64_t clock_datetimeToTimestamp ( const clock_DateTime dateTime)

Convert a datetime to a timestamp.

Parameters
dateTimePointer to the datetime to convert
Returns
A timestamp representing the given datetime as a number of seconds since January 1st, 1970

◆ clock_getTimestamp()

uint64_t clock_getTimestamp ( )

Get the current timestamp.

Returns
A timestamp representing the current time as number of seconds since January 1st, 1970

◆ clock_timestampToDatetime()

void clock_timestampToDatetime ( uint64_t  timestamp,
clock_DateTime dateTime 
)

Convert a timestamp to a datetime.

Parameters
timestampThe timestamp to convert
dateTimePointer to a datetime struct to write