Dynamically change resolution passed to OS_WAIT
Dynamically change resolution passed to OS_WAIT

res was hard coded to 16 ms, which could waste too many iterations when
CPU is fast enough.

Suppose WAIT starts with timeout = 30, and Awake_System always returns
negatives:
1. first iteration will call OS_WAIT with 30, and actually waits 14 ms
(timeout - res).
2. second iteration will call OS_WAIT with 16, and OS_WAIT will not wait
at all, because (timeout - res == 0).
3. third iteration will call OS_WAIT with probably 16 (or < 16, depending
on how fast the second iteration finished),

and a busy loop will start until 16 ms elapses.

zsx/r3,zsx/r3,zsx/r3,zsx/r3