Let button task sleep for 1ms during one loop
Fix the beat cycle time calculation