Use pi timer, not OS timer