# :: AS2: Timer ::

**URL:** <https://forum.kirupa.com/t/as2-timer/237809>\
**Category:** flash\
**Created:** [September 4, 2007, 8:36am UTC](https://forum.kirupa.com/t/as2-timer/237809 "2007-09-04T08:36:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilleypants](https://avatars.discourse-cdn.com/v4/letter/l/f17d59/32.png) [@lilleypants](https://forum.kirupa.com/u/lilleypants)\
**Post date:** [September 4, 2007, 8:36am UTC](https://forum.kirupa.com/t/as2-timer/237809/1 "2007-09-04T08:36:45Z")

</div>

I thought this would be really simple but for some reason i cannot get this to work. I want to create a timer that basically records when 45 mins, are up and then produce a pop-up to say times up… does anyone have any ideas on how to go about this?

[COLOR=darkorange]function callback() {  
trace(“interval called: “+getTimer()+” ms.”);  
}[/COLOR]  
[COLOR=darkorange]var intervalID:Number = setInterval(callback, 1000);[/COLOR]  
[COLOR=darkorange][/COLOR]  
[COLOR=black]I thought it would just be an if statement like if get Timer \>= than say 7000 then time is up, but that doesn’t work :huh:[/COLOR]  
Thanks
