(AGK version: 108.14)
Submitted: 2013-07-05 15:20:12
Setvirtualresolution(640,480)
ResetTimer()
AddVirtualButton(1,200,240,80)
SetVirtualButtonText(1,"Reset")
Repeat
    Print (Timer())
    If GetVirtualButtonPressed(1) then ResetTimer()
    Sync()
Until Timer()>10
End
(AGK version: 1.24.1)
Submitted: 2017-11-30 14:47:25
// 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
(AGK version: 2)
Submitted: 2019-02-03 17:47:20
function Delay(seconds#)
	ResetTimer()
	repeat
		Sync()
	until Timer() >= seconds#
endfunction
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.