MIP_SDK
latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
src
c
microstrain
common
embedded_time.h
Go to the documentation of this file.
1
2
#include "
platform.h
"
3
4
#include <stdint.h>
5
6
7
#ifdef __cplusplus
8
namespace
microstrain
{
9
namespace
C {
10
#else
11
#include <assert.h>
12
#endif
13
23
#ifdef MICROSTRAIN_TIMESTAMP_TYPE
24
typedef
MICROSTRAIN_TIMESTAMP_TYPE
microstrain_embedded_timestamp
;
25
static_assert(
sizeof
(
microstrain_embedded_timestamp
) >= 8 || (
microstrain_embedded_timestamp
)(-1) > 0,
"MICROSTRAIN_TIMESTAMP_TYPE must be unsigned unless 64 bits."
);
26
27
#elif defined(MICROSTRAIN_PLATFORM_DESKTOP)
28
// By default, on desktop we use 64-bit timestamps.
29
typedef
uint64_t
microstrain_embedded_timestamp
;
30
#else
31
// If the platform isn't known, assume u32 timestamps.
32
typedef
uint32_t
microstrain_embedded_timestamp
;
33
#endif
34
35
// Timeouts are just an alias for timestamps
36
typedef
microstrain_embedded_timestamp
microstrain_embedded_timeout
;
37
38
#ifdef __cplusplus
39
}
// namespace C
40
}
// namespace microstrain
41
#endif // __cplusplus
microstrain::C::microstrain_embedded_timeout
microstrain_embedded_timestamp microstrain_embedded_timeout
Definition:
embedded_time.h:36
platform.h
microstrain::C::microstrain_embedded_timestamp
uint32_t microstrain_embedded_timestamp
Type used for packet timestamps and timeouts.
Definition:
embedded_time.h:32
microstrain
Definition:
embedded_time.h:8
Generated by
1.8.17