one seoncs
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user