// Project: test_Timer() and ResetTimer() // Created: 2017-11-30 SetScreenResolution(1280,790) SetDisplayAspect(1.618) // golden aspect ratio Global gTime = 10 //Inicial 10 seconds until exit APP ResetTimer() do if GetPointerPressed() then ResetTimer() // reset countdown Print( "Tap to reset CountDown to Exit: " + str(round(abs(Timer() - gTime))) ) // show no decimals, no negative sign Sync() if Timer() > gTime then exit loop end
function Delay(seconds#) ResetTimer() repeat Sync() until Timer() >= seconds# endfunction