Commit ab57de77 authored by Sven Greiner's avatar Sven Greiner

A second is not a second

delay_s() varies between 750 and 1000 ms. Not a big problem in our case
because the delay is not very critical and just delays periodic events.
So if everything is right the delay between these periodic events should
be always of the same length. But let's document this.
parent 946b084a
......@@ -143,6 +143,10 @@ void delay_10ms(uint8_t duration) {
/**
* Delay one second. Saves some space because call does not require setup of
* arguments.
*
* Because we do not know when exactly we have entered this function in
* relation to the ticks counter the actually delay might range from 750 to
* 1000 ms.
*/
void delay_s(void) {
const uint8_t time = ticks + 4; // now + 1s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment