KNX IoT
KNX IoT Point API stack implementation
oc_clock.h File Reference

platform abstraction of a real time clock More...

#include "oc_clock_util.h"
#include <stdint.h>

Go to the source code of this file.

Functions

void oc_clock_init (void)
 A second, measured in system clock time. More...
 
unsigned long oc_clock_seconds (void)
 Get the current value of the platform seconds. More...
 
oc_clock_time_t oc_clock_time (void)
 Get the current clock time. More...
 
void oc_clock_wait (oc_clock_time_t t)
 Wait for a given number of ticks. More...
 

Detailed Description

platform abstraction of a real time clock

Definition in file oc_clock.h.

Function Documentation

◆ oc_clock_init()

void oc_clock_init ( void  )

A second, measured in system clock time.

Initialize the clock library.

This function initializes the clock library and should be called from the main() function of the system.

◆ oc_clock_seconds()

unsigned long oc_clock_seconds ( void  )

Get the current value of the platform seconds.

This could be the number of seconds since startup, or since a standard epoch.

Returns
The value.

◆ oc_clock_time()

oc_clock_time_t oc_clock_time ( void  )

Get the current clock time.

This function returns the current system clock time.

Returns
The current clock time, measured in system ticks.

◆ oc_clock_wait()

void oc_clock_wait ( oc_clock_time_t  t)

Wait for a given number of ticks.

Parameters
tHow many ticks.