Start with Darrel Taylor's "Elapsed Timer" code.
You don't really need to bother with keeping the real time,
but once implemented you can easily check the Secondschanged variable
and count seconds at any time from there.
A "Ticks" (1/100th of a second) variable is also available.
Cheers, Art.