![]() |
ErrorLib 1.0.8-master SHA: 810228da25
|
Definition of timestamp data-structs. More...
#include <stdbool.h>#include <stdint.h>#include "cmsis_compiler.h"Go to the source code of this file.
Data Structures | |
| struct | Type_Timestamp |
| Definition of a timestamp type. More... | |
| struct | Type_DateTime |
Functions | |
| Type_Timestamp | getTimestamp (void) |
| uint32_t | DateTimeToUtc (Type_DateTime tDateTime) |
| Converts structured UTC to seconds that have elapsed since January 1, 2020. More... | |
| Type_DateTime | UtcToDateTime (uint32_t UnixTime) |
| Converts seconds that have elapsed since January 1, 2020 to structured UTC. More... | |
| static __INLINE bool | TimestampOlder (Type_Timestamp tTimestamp1, Type_Timestamp tTimestamp2) |
| This functions compares two Type_Timestamp. More... | |
| static __INLINE Type_Timestamp | TimestampDifference (Type_Timestamp tTimestamp1, Type_Timestamp tTimestamp2) |
| This functions subtract two Type_Timestamp. More... | |
Definition of timestamp data-structs.
© Copyright 2017-2022 Copyright: Retostronik GmbH Stütingstraße 30 58285 Gevelsberg
| uint32_t DateTimeToUtc | ( | Type_DateTime | tDateTime | ) |
Converts structured UTC to seconds that have elapsed since January 1, 2020.
| tDateTime | Year [2020..2088], month [1..12], day [1..31], hour [0..23], minute [0..59], second [0..59] |
| Type_Timestamp getTimestamp | ( | void | ) |
|
static |
This functions subtract two Type_Timestamp.
| tTimestamp1 | first time stamp |
| tTimestamp2 | second time stamp |
| tTimestamp1 | - tTimestamp2 |
|
static |
This functions compares two Type_Timestamp.
| tTimestamp1 | first time stamp to compare |
| tTimestamp2 | second time stamp to compare |
| true | if tTimestamp1 is older than tTimestamp2, false if equal or newer |
| Type_DateTime UtcToDateTime | ( | uint32_t | TimeStamp | ) |
Converts seconds that have elapsed since January 1, 2020 to structured UTC.
| TimeStamp | seconds since January 1, 2020 |