Stopwatch-Update #200
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#200
Loading…
Reference in New Issue
No description provided.
Delete Branch "KSat/fsfw:mueller/Stopwatch-Update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There is a bug in the current stopwatch:
Using getClock_timeval can lead to wrong results because the clock can be set to another value in between measurement operations.
Therefore, getUptime has to be used.
I reverted the code back to using getUptime. In the Linux osal, the function which provides higher time accuracy is used now.
I also deleted the dur_seconds_t typedef because seconds can have many formats (full seconds as an integer type, or floating numbers as either float or double)..
I suggest that a Clock API function is written which provides uptime in seconds (rounded maybe?). I also think it would be nice to hook
into the functions to get MS or Seconds ticks so a framework user can use hardware like high precision RTT/RTCs to use an own tick source.
But that will be a separate request..