cueOS  2.4
cueOS - Universal Show Control OS for ARM
ms_chronometer.c
1/***============================================================================================================================
2 * Dependencies inclusion
3 * Necessary dependencies should be declared here. Header file should contain as little dependecies declarations as possible
4 *=============================================================================================================================*/
5
6#include "cueos_config.h"
7#if cueOS_CONFIG_NODETYPE == cueOS_NODETYPE_SLAVE_DMX
8#include "cmsis_os.h"
9#include "ms_chronometer.h"
10
11
12/***============================================================================================================================
13 * Public functions definitions
14 * These functions can be accessed outside of the file's scope
15 * @see DMX512_scene.h for declarations
16 *=============================================================================================================================*/
17
24 ms_chronometer->_ms_delta = osKernelGetTickCount() - 1;
25}
26
34 return osKernelGetTickCount() - ms_chronometer->_ms_delta;
35}
36
37#endif
void ms_chronometer_reset(ms_chronometer_s *ms_chronometer)
Resets an mschronometer instance time delta to zero.
uint32_t ms_chronometer_get_elapsed_ms(ms_chronometer_s *ms_chronometer)
Returns elapsed time in milliseconds since last reset.
ms_chronometer structure object