LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
juno_time.c File Reference
#include "juno/macros.h"
#include "juno/status.h"
#include "juno/time/time_api.h"
#include <stdint.h>
Include dependency graph for juno_time.c:

Functions

JUNO_STATUS_T JunoTime_AddTime (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T *ptRetTime, JUNO_TIMESTAMP_T tTimeToAdd)
 Add a duration to a timestamp in-place.
 
JUNO_STATUS_T JunoTime_SubtractTime (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T *ptRetTime, JUNO_TIMESTAMP_T tTimeToSubtract)
 Subtract a duration from a timestamp in-place. If the subtraction would underflow (negative time), the result is saturated to 0 seconds and 0 subseconds, and JUNO_STATUS_INVALID_DATA_ERROR is returned.
 
JUNO_TIME_NANOS_RESULT_T JunoTime_TimestampToNanos (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)
 
JUNO_TIME_MICROS_RESULT_T JunoTime_TimestampToMicros (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)
 
JUNO_TIME_MILLIS_RESULT_T JunoTime_TimestampToMillis (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTime)
 
JUNO_TIMESTAMP_RESULT_T JunoTime_NanosToTimestamp (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_NANOS_T iNanos)
 
JUNO_TIMESTAMP_RESULT_T JunoTime_MicrosToTimestamp (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_MICROS_T iMicros)
 
JUNO_TIMESTAMP_RESULT_T JunoTime_MillisToTimestamp (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIME_MILLIS_T iMillis)
 
JUNO_RESULT_F64_T JunoTime_TimestampToDouble (const JUNO_TIME_ROOT_T *ptTime, JUNO_TIMESTAMP_T tTimestamp)
 
JUNO_TIMESTAMP_RESULT_T JunoTime_DoubleToTimestamp (const JUNO_TIME_ROOT_T *ptTime, double dTimestamp)
 

Variables

static const JUNO_TIME_SUBSECONDS_T giSUBSECS_MAX = (~(JUNO_TIME_SUBSECONDS_T)0)
 
static const JUNO_TIME_SECONDS_T giSECS_MAX = (~(JUNO_TIME_SECONDS_T)0)
 

Variable Documentation

◆ giSECS_MAX

const JUNO_TIME_SECONDS_T giSECS_MAX = (~(JUNO_TIME_SECONDS_T)0)
static

◆ giSUBSECS_MAX

const JUNO_TIME_SUBSECONDS_T giSUBSECS_MAX = (~(JUNO_TIME_SUBSECONDS_T)0)
static