SpaceTeam / STS1_COBC_SW

Software for the communication and onboard computer (COBC) of SpaceTeamSat1 (STS1)
MIT License
10 stars 2 forks source link

Add strong types for time #320

Closed PatrickKa closed 2 months ago

PatrickKa commented 3 months ago

Description

We have two times: "Rodos time" and "real time". The first is the time since the last reset in nanoseconds and has type int64_t. The second is our best guess for the current UTC, given as a UNIX timestamp in seconds with type int32_t. Both times need a strong type for time points, but I think that only the Rodos time needs a duration type. Those three types should be called RodosTime, Duration and RealTime.

Of course those types should also be used, e.g., for the timeout parameters of the SPI communication functions or the start times of the EDU programs.