# Timer problem

**URL:** <https://forum.kirupa.com/t/timer-problem/90334>\
**Category:** Uncategorized\
**Created:** [May 17, 2005, 12:50am UTC](https://forum.kirupa.com/t/timer-problem/90334 "2005-05-17T00:50:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dzyner68](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dzyner68](https://forum.kirupa.com/u/dzyner68)\
**Post date:** [May 17, 2005, 12:50am UTC](https://forum.kirupa.com/t/timer-problem/90334/1 "2005-05-17T00:50:42Z")

</div>

hi all! I am making a concentration style game, that matches states & capitals. Anyway i made a simple timer that is supposed to start when the first card is flipped over. The problem I’m having is that I don’t know where to put the function for the timer. If i put it within the function that checks for which card it flips it doesnt work, if i put it in the first frame, it plays on the first frame. here is the code that i wrote:

startTimer = function (timeMe) {  
timer = getTimer();  
ms = timer%1000;  
sec = ((timer-ms)/1000)%60;  
min = Math.floor(timer/60/1000);  
if (sec\<10) {  
zero = 0;  
} else {  
zero = “”;  
}  
};  
I’ve tried setting a boolean property, but that moves the timer with each time a card is flipped. If anyone could provide any insight that would be great. Sorry for being so verbose!
