FORUMS: list search recent posts

# Timer in increments of 3

FAQ   •   VIEW ALL
 Timer in increments of 3 on May 12, 2016 at 9:59:25 pm

I've got this expression on the source text of a text layer, a timer ascending in increments of one second. It works just fine, but I need it to increment every three seconds, so it will show, 00:00 - 00:03 - 00:06 - 00:09... etc.
How can I modify this?
Of course I still need the seconds to go up to 59 for every minute, not 99.
Any help is greatly appreciated!
Thanks
Lili

```rate = 1; clockStart = 00; function padZero(n){ if (n &lt; 10) return "0" + n else return "" + n } clockTime = Math.max(clockStart + rate*(time - inPoint),0); t = Math.floor(clockTime); min = Math.floor((t%3600)/60); sec = Math.floor(t%60); min + ":" + padZero(sec)```

Lili

 Re: Timer in increments of 3on May 12, 2016 at 11:00:57 pm

I doubt this is the most efficient way to do it, but you could change this line:

sec = Math.floor(t%60);

to this:

sec = Math.floor(Math.floor(t%60)/3)*3;

Dan