mueller_stopwatch #30

Merged
muellerr merged 18 commits from KSat/fsfw:mueller_stopwatch into master 2020-07-07 12:05:04 +02:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 35b9346c2b - Show all commits

View File

@ -5,6 +5,7 @@
extern "C" {
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
}

View File

@ -25,11 +25,11 @@ seconds_t Stopwatch::stopSeconds() {
void Stopwatch::display() {
if(displayMode == StopwatchDisplayMode::MILLIS) {
Review

Here a float is returned but a double is calculated.

Here a float is returned but a double is calculated.
info << "Stopwatch: Operation took " << (elapsedTime.tv_sec * 1000 +
sif::info << "Stopwatch: Operation took " << (elapsedTime.tv_sec * 1000 +
elapsedTime.tv_usec / 1000) << " milliseconds" << std::endl;
}
else if(displayMode == StopwatchDisplayMode::SECONDS) {
info <<"Stopwatch: Operation took " << std::setprecision(3)
sif::info <<"Stopwatch: Operation took " << std::setprecision(3)
<< std::fixed << timevalOperations::toDouble(elapsedTime)
<< " seconds" << std::endl;
}