# Help with timer please

**URL:** https://forum.kirupa.com/t/help-with-timer-please/273392
**Category:** flash
**Created:** [October 15, 2008, 2:58am UTC](https://forum.kirupa.com/t/help-with-timer-please/273392 "2008-10-15T02:58:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)
#### Post date: [October 15, 2008, 2:58am UTC](https://forum.kirupa.com/t/help-with-timer-please/273392/1 "2008-10-15T02:58:57Z")

</div>

I found a function online that converts seconds to a 00:00 value

```auto

function formatTime(time:Number):String
{
	if (time > 0)
	{
		var integer:String = String((time*.0166)>>0);
		var decimal:String = String((time%60)>>0);
		return integer.length < 2?"0" + integer:integer + ":" + decimal.length < 2?"0" + decimal:decimal;
	}
	else
	{
		return String("00:00");
	}
}

```

That is the function and I call it in another timer function like so:

```auto

displayTime.text = formatTime(v.playheadTime);

```

‘v’ is my instance of FLVPlayback().

Anyway, when I compile the error I am getting is this:

1176: Comparison between a value with static type String and a possibly unrelated type int.

Can someone help me figure out what is going on? Thanks!
