diff options
| author | Maximilien Cuony <maximilien@theglu.org> | 2016-06-14 20:14:18 +0200 |
|---|---|---|
| committer | Maximilien Cuony <maximilien@theglu.org> | 2016-06-14 20:14:18 +0200 |
| commit | 9334c11d1137c3e56f2ff9a8e842e96083dadc32 (patch) | |
| tree | 91f2909f78a7fb3be909edb21fea647d6712b3f4 /src/common/includes/Core | |
| parent | 409af9f6ffb61508533769ca177d628315c73e2d (diff) | |
| download | glutte-o-matic-9334c11d1137c3e56f2ff9a8e842e96083dadc32.tar.gz glutte-o-matic-9334c11d1137c3e56f2ff9a8e842e96083dadc32.tar.bz2 glutte-o-matic-9334c11d1137c3e56f2ff9a8e842e96083dadc32.zip | |
Generation of derived time
Diffstat (limited to 'src/common/includes/Core')
| -rw-r--r-- | src/common/includes/Core/common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/includes/Core/common.h b/src/common/includes/Core/common.h index 7e06975..5703cbd 100644 --- a/src/common/includes/Core/common.h +++ b/src/common/includes/Core/common.h @@ -48,6 +48,10 @@ uint64_t timestamp_now(void); // regardless of return value. int local_time(struct tm *time); +// Try to calculate local time, based on a past valid local time and the current timestamp +// Return 1 on success, 0 on failure +int local_derived_time(struct tm *time); + // Return either 0 or 1, somewhat randomly int random_bool(void); @@ -69,3 +73,5 @@ void hard_fault_handler_c(uint32_t *); // Round a value to the nearest 0.5 float round_float_to_half_steps(float value); + +#define GPS_MS_TIMEOUT 2000ul |
