mirror of https://github.com/FOME-Tech/fome-fw.git
time in seconds doesn't need a special type
This commit is contained in:
parent
8d1029314a
commit
b505b8ba0b
|
@ -38,10 +38,6 @@ using time_t = uint32_t;
|
|||
#define STOICH_RATIO 14.7f
|
||||
#define CONST_PI 3.14159265358979323846
|
||||
|
||||
|
||||
// time in seconds
|
||||
using efitimesec_t = time_t;
|
||||
|
||||
/**
|
||||
* We use a signed type here so that subtraction result is a proper negative value.
|
||||
* A typical use-case negative result is when we do 'timeNow() - timeOfEvent' where timeOfEvent
|
||||
|
|
|
@ -23,7 +23,7 @@ efitimeus_t getTimeNowUs() {
|
|||
* Integer number of seconds since ECU boot.
|
||||
* 31,710 years - would not overflow during our life span.
|
||||
*/
|
||||
efitimesec_t getTimeNowS(void) {
|
||||
int64_t getTimeNowS() {
|
||||
return getTimeNowUs() / US_PER_SECOND;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,6 +108,6 @@ efitimeus_t getTimeNowUs();
|
|||
/**
|
||||
* @brief Current system time in seconds.
|
||||
*/
|
||||
efitimesec_t getTimeNowS();
|
||||
int64_t getTimeNowS();
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
|
Loading…
Reference in New Issue