one seoncs

This commit is contained in:
2021-03-04 15:34:20 +01:00
parent 4be07210e0
commit 446a279277

View File

@ -92,8 +92,12 @@ int main (void) {
// add averaging and forming the struct here
uint32_t duration = ((current_seconds - last_seconds) * 1000) + (current_milliseconds - last_milliseconds);
logmsg(LOG_DEBUG, "s: %lu, ns: %lu, d: %lu, p: %lu", current_seconds, current_milliseconds, duration, period);
last_seconds = current_seconds;
last_milliseconds = current_milliseconds;
if (duration >= 1000) {
logmsg(LOG_DEBUG, "one second is over");
last_seconds = current_seconds;
last_milliseconds = current_milliseconds;
}