millis
This commit is contained in:
@ -90,7 +90,12 @@ int main (void) {
|
|||||||
uint32_t current_milliseconds = timestamp.tv_nsec / 1e6;
|
uint32_t current_milliseconds = timestamp.tv_nsec / 1e6;
|
||||||
|
|
||||||
// add averaging and forming the struct here
|
// add averaging and forming the struct here
|
||||||
logmsg(LOG_DEBUG, "s: %lu, ns: %lu, p: %lu", current_seconds, current_milliseconds, period);
|
uint32_t duration = (current_seconds - last_seconds) + (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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ledTick++;
|
ledTick++;
|
||||||
if (ledTick == 50) {
|
if (ledTick == 50) {
|
||||||
|
Reference in New Issue
Block a user