LibJuno 0.42.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
|
#include "juno/status.h"
#include "juno/module.h"
#include "juno/types.h"
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | JUNO_TIMESTAMP_TAG |
struct | JUNO_TIME_API_TAG |
Macros | |
#define | JUNO_TIME_NEW_API(Now, SleepTo, Sleep) |
Typedefs | |
typedef struct JUNO_TIME_API_TAG | JUNO_TIME_API_T |
typedef union JUNO_TIME_TAG | JUNO_TIME_T |
typedef struct JUNO_TIME_ROOT_TAG | JUNO_TIME_ROOT_T |
typedef struct JUNO_TIMESTAMP_TAG | JUNO_TIMESTAMP_T |
typedef uint64_t | JUNO_TIME_SECONDS_T |
typedef uint64_t | JUNO_TIME_MILLIS_T |
typedef uint64_t | JUNO_TIME_MICROS_T |
typedef uint64_t | JUNO_TIME_NANOS_T |
typedef uint64_t | JUNO_TIME_SUBSECONDS_T |
#define JUNO_TIME_NEW_API | ( | Now, | |
SleepTo, | |||
Sleep | |||
) |
typedef struct JUNO_TIME_API_TAG JUNO_TIME_API_T |
This header contains the time library API
typedef uint64_t JUNO_TIME_MICROS_T |
typedef uint64_t JUNO_TIME_MILLIS_T |
typedef uint64_t JUNO_TIME_NANOS_T |
typedef struct JUNO_TIME_ROOT_TAG JUNO_TIME_ROOT_T |
typedef uint64_t JUNO_TIME_SECONDS_T |
typedef uint64_t JUNO_TIME_SUBSECONDS_T |
typedef union JUNO_TIME_TAG JUNO_TIME_T |
typedef struct JUNO_TIMESTAMP_TAG JUNO_TIMESTAMP_T |
JUNO_MODULE_RESULT | ( | JUNO_TIME_MICROS_RESULT_T | , |
JUNO_TIME_MICROS_T | |||
) |
JUNO_MODULE_RESULT | ( | JUNO_TIME_MILLIS_RESULT_T | , |
JUNO_TIME_MILLIS_T | |||
) |
JUNO_MODULE_RESULT | ( | JUNO_TIME_NANOS_RESULT_T | , |
JUNO_TIME_NANOS_T | |||
) |
JUNO_MODULE_RESULT | ( | JUNO_TIME_SECONDS_RESULT_T | , |
JUNO_TIME_SECONDS_T | |||
) |
JUNO_MODULE_RESULT | ( | JUNO_TIME_SUBSECONDS_RESULT_T | , |
JUNO_TIME_SUBSECONDS_T | |||
) |
JUNO_MODULE_RESULT | ( | JUNO_TIMESTAMP_RESULT_T | , |
JUNO_TIMESTAMP_T | |||
) |
struct JUNO_TIME_ROOT_TAG JUNO_MODULE_ROOT | ( | JUNO_TIME_API_T | , |
JUNO_MODULE_EMPTY | |||
) |
This is the Juno Time Module for all time time related operations. Some of the time API function implementations may be very implementation specific, so be consciencous of the implementation.
Certain operations regarding time math are implemented by LibJuno for module developers to include: JunoTime_AddTime
JunoTime_SubtractTime
JunoTime_TimestampToNanos
JunoTime_TimestampToMicros
JunoTime_TimestampToMillis
JunoTime_NanosToTimestamp
JunoTime_MicrosToTimestamp
JunoTime_MillisToTimestamp
JUNO_STATUS_T JunoTime_AddTime | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIMESTAMP_T * | ptRetTime, | ||
JUNO_TIMESTAMP_T | tTimeToAdd | ||
) |
JUNO_TIMESTAMP_RESULT_T JunoTime_DoubleToTimestamp | ( | JUNO_TIME_T * | ptTime, |
double | dTimestamp | ||
) |
JUNO_TIMESTAMP_RESULT_T JunoTime_MicrosToTimestamp | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIME_MICROS_T | iMicros | ||
) |
JUNO_TIMESTAMP_RESULT_T JunoTime_MillisToTimestamp | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIME_MILLIS_T | iMillis | ||
) |
JUNO_TIMESTAMP_RESULT_T JunoTime_NanosToTimestamp | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIME_NANOS_T | iNanos | ||
) |
JUNO_STATUS_T JunoTime_SubtractTime | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIMESTAMP_T * | ptRetTime, | ||
JUNO_TIMESTAMP_T | tTimeToSubtract | ||
) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
JUNO_RESULT_F64_T JunoTime_TimestampToDouble | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIMESTAMP_T | tTimestamp | ||
) |
JUNO_TIME_MICROS_RESULT_T JunoTime_TimestampToMicros | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIMESTAMP_T | tTime | ||
) |
JUNO_TIME_MILLIS_RESULT_T JunoTime_TimestampToMillis | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIMESTAMP_T | tTime | ||
) |
JUNO_TIME_NANOS_RESULT_T JunoTime_TimestampToNanos | ( | JUNO_TIME_T * | ptTime, |
JUNO_TIMESTAMP_T | tTime | ||
) |