LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
JUNO_TIME_API_TAG Struct Reference

Vtable for time operations and conversions. More...

#include <time_api.h>

Data Fields

JUNO_TIMESTAMP_RESULT_T(* Now )(const JUNO_TIME_ROOT_T *ptTime)
 Get the current time as specified by the implementation.
 
JUNO_STATUS_T(* AddTime )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T *ptRetTime, JUNO_TIMESTAMP_T tTimeToAdd)
 Perform addition with time (in-place add to ptRetTime)
 
JUNO_STATUS_T(* SubtractTime )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T *ptRetTime, JUNO_TIMESTAMP_T tTimeToSubtract)
 Perform subtraction with time (in-place subtract from ptRetTime)
 
JUNO_STATUS_T(* SleepTo )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTimeToWakeup)
 Sleep this thread until a specific time.
 
JUNO_STATUS_T(* Sleep )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tDuration)
 Sleep this thread for a duration.
 
JUNO_TIME_NANOS_RESULT_T(* TimestampToNanos )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)
 Convert a timestamp to nanoseconds (round to nearest, half-up)
 
JUNO_TIME_MICROS_RESULT_T(* TimestampToMicros )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)
 Convert a timestamp to microseconds (round to nearest, half-up)
 
JUNO_TIME_MILLIS_RESULT_T(* TimestampToMillis )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)
 Convert a timestamp to milliseconds (round to nearest, half-up)
 
JUNO_TIMESTAMP_RESULT_T(* NanosToTimestamp )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_NANOS_T iNanos)
 Convert nanoseconds to a timestamp.
 
JUNO_TIMESTAMP_RESULT_T(* MicrosToTimestamp )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_MICROS_T iMicros)
 Convert microseconds to a timestamp.
 
JUNO_TIMESTAMP_RESULT_T(* MillisToTimestamp )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_MILLIS_T iMillis)
 Convert milliseconds to a timestamp.
 
JUNO_RESULT_F64_T(* TimestampToDouble )(const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTimestamp)
 Convert a timestamp to a double.
 
JUNO_TIMESTAMP_RESULT_T(* DoubleToTimestamp )(const JUNO_TIME_ROOT_T *ptTime, double dTimestamp)
 Convert a double to a timestamp.
 

Detailed Description

Vtable for time operations and conversions.

Field Documentation

◆ AddTime

JUNO_STATUS_T(* JUNO_TIME_API_TAG::AddTime) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T *ptRetTime, JUNO_TIMESTAMP_T tTimeToAdd)

Perform addition with time (in-place add to ptRetTime)

◆ DoubleToTimestamp

JUNO_TIMESTAMP_RESULT_T(* JUNO_TIME_API_TAG::DoubleToTimestamp) (const JUNO_TIME_ROOT_T *ptTime, double dTimestamp)

Convert a double to a timestamp.

◆ MicrosToTimestamp

JUNO_TIMESTAMP_RESULT_T(* JUNO_TIME_API_TAG::MicrosToTimestamp) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_MICROS_T iMicros)

Convert microseconds to a timestamp.

◆ MillisToTimestamp

JUNO_TIMESTAMP_RESULT_T(* JUNO_TIME_API_TAG::MillisToTimestamp) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_MILLIS_T iMillis)

Convert milliseconds to a timestamp.

◆ NanosToTimestamp

JUNO_TIMESTAMP_RESULT_T(* JUNO_TIME_API_TAG::NanosToTimestamp) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_NANOS_T iNanos)

Convert nanoseconds to a timestamp.

◆ Now

JUNO_TIMESTAMP_RESULT_T(* JUNO_TIME_API_TAG::Now) (const JUNO_TIME_ROOT_T *ptTime)

Get the current time as specified by the implementation.

◆ Sleep

JUNO_STATUS_T(* JUNO_TIME_API_TAG::Sleep) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tDuration)

Sleep this thread for a duration.

◆ SleepTo

JUNO_STATUS_T(* JUNO_TIME_API_TAG::SleepTo) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTimeToWakeup)

Sleep this thread until a specific time.

◆ SubtractTime

JUNO_STATUS_T(* JUNO_TIME_API_TAG::SubtractTime) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T *ptRetTime, JUNO_TIMESTAMP_T tTimeToSubtract)

Perform subtraction with time (in-place subtract from ptRetTime)

◆ TimestampToDouble

JUNO_RESULT_F64_T(* JUNO_TIME_API_TAG::TimestampToDouble) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTimestamp)

Convert a timestamp to a double.

◆ TimestampToMicros

JUNO_TIME_MICROS_RESULT_T(* JUNO_TIME_API_TAG::TimestampToMicros) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)

Convert a timestamp to microseconds (round to nearest, half-up)

◆ TimestampToMillis

JUNO_TIME_MILLIS_RESULT_T(* JUNO_TIME_API_TAG::TimestampToMillis) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)

Convert a timestamp to milliseconds (round to nearest, half-up)

◆ TimestampToNanos

JUNO_TIME_NANOS_RESULT_T(* JUNO_TIME_API_TAG::TimestampToNanos) (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)

Convert a timestamp to nanoseconds (round to nearest, half-up)


The documentation for this struct was generated from the following file: