| **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 < 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 3** on 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

| **Re: Timer in increments of 3** on May 16, 2016 at 4:20:38 pm |

Thanks Dan, that works great.

Lili