1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Converted currentTime to currentTimeUs

This commit is contained in:
Martin Budden 2016-12-01 18:57:20 +00:00
parent ec0b52aea1
commit 8d3c825646
38 changed files with 197 additions and 165 deletions

View file

@ -21,6 +21,8 @@
#include "platform.h"
// time difference, 32 bits always sufficient
typedef int32_t timeDelta_t;
// millisecond time
typedef uint32_t timeMs_t ;
// microsecond time
@ -31,3 +33,5 @@ typedef uint64_t timeUs_t;
typedef uint32_t timeUs_t;
#define TIMEUS_MAX UINT32_MAX
#endif
static inline timeDelta_t cmpTimeUs(timeUs_t a, timeUs_t b) { return (timeDelta_t)(a - b); }