Revision f3ac1c96 core/inc/aos_time.h
core/inc/aos_time.h | ||
---|---|---|
29 | 29 |
|
30 | 30 |
#include <stdint.h> |
31 | 31 |
|
32 |
/** |
|
33 |
* @brief Generic time to represent long time frames at high precision. |
|
34 |
* @note By definition the temporal resolution is 1us. |
|
35 |
*/ |
|
36 |
typedef uint64_t aos_timestamp_t; |
|
37 |
|
|
38 |
/** |
|
39 |
* @brief generic time to represent medium length time frames at high precision. |
|
40 |
* @note By definition the temporal resolution is 1us. |
|
41 |
*/ |
|
42 |
typedef uint32_t aos_interval_t; |
|
43 |
|
|
44 |
/** |
|
45 |
* @brief Generic time to represent long time frames at high precision. |
|
46 |
* @note By definition the temporal resolution is 1us. |
|
47 |
*/ |
|
48 |
typedef aos_timestamp_t aos_longinterval_t; |
|
32 |
/******************************************************************************/ |
|
33 |
/* CONSTANTS */ |
|
34 |
/******************************************************************************/ |
|
49 | 35 |
|
50 | 36 |
#define MICROSECONDS_PER_MICROSECOND ((uint8_t) (1)) |
51 | 37 |
#define MILLISECONDS_PER_MILLISECOND ((uint8_t) (1)) |
... | ... | |
212 | 198 |
#define MILLENIUMS_PER_DECADE ((float)MILLENIUMS_PER_MILLENIUM / (float)DECADES_PER_MILLENIUM) |
213 | 199 |
#define MILLENIUMS_PER_CENTURY ((float)MILLENIUMS_PER_MILLENIUM / (float)CENTURIES_PER_MILLENIUM) |
214 | 200 |
|
201 |
/******************************************************************************/ |
|
202 |
/* SETTINGS */ |
|
203 |
/******************************************************************************/ |
|
204 |
|
|
205 |
/******************************************************************************/ |
|
206 |
/* CHECKS */ |
|
207 |
/******************************************************************************/ |
|
208 |
|
|
209 |
/******************************************************************************/ |
|
210 |
/* DATA STRUCTURES AND TYPES */ |
|
211 |
/******************************************************************************/ |
|
212 |
|
|
213 |
/** |
|
214 |
* @brief Generic time to represent long time frames at high precision. |
|
215 |
* @note By definition the temporal resolution is 1us. |
|
216 |
*/ |
|
217 |
typedef uint64_t aos_timestamp_t; |
|
218 |
|
|
219 |
/** |
|
220 |
* @brief generic time to represent medium length time frames at high precision. |
|
221 |
* @note By definition the temporal resolution is 1us. |
|
222 |
*/ |
|
223 |
typedef uint32_t aos_interval_t; |
|
224 |
|
|
225 |
/** |
|
226 |
* @brief Generic time to represent long time frames at high precision. |
|
227 |
* @note By definition the temporal resolution is 1us. |
|
228 |
*/ |
|
229 |
typedef aos_timestamp_t aos_longinterval_t; |
|
230 |
|
|
231 |
/******************************************************************************/ |
|
232 |
/* MACROS */ |
|
233 |
/******************************************************************************/ |
|
234 |
|
|
235 |
/******************************************************************************/ |
|
236 |
/* EXTERN DECLARATIONS */ |
|
237 |
/******************************************************************************/ |
|
238 |
|
|
215 | 239 |
#ifdef __cplusplus |
216 | 240 |
extern "C" { |
217 | 241 |
#endif |
... | ... | |
220 | 244 |
} |
221 | 245 |
#endif |
222 | 246 |
|
247 |
/******************************************************************************/ |
|
248 |
/* INLINE FUNCTIONS */ |
|
249 |
/******************************************************************************/ |
|
250 |
|
|
223 | 251 |
#endif /* AMIROOS_TIME_H */ |
224 | 252 |
|
225 | 253 |
/** @} */ |
Also available in: Unified diff