Proper timing using the hardware timer - based of OK04