mIRC Homepage
Posted By: 2big Timing Something? - 30/08/03 05:39 AM
Is there a way to time something without a timer? Like increment something by 1 every second(not necessarily timing), or keeping someone else's online time, (or time in a channel) by incrementing a variable every second they are there? I've looked everywhere in the help file. Any help is appreciated.
Posted By: Jerk Re: Timing Something? - 30/08/03 05:51 AM
/inc [-cszuN] <%var> [value]
This increases the value of %var by value.

If you specify the -uN switch, %var is increased by the value once and then %var is unset N seconds later, assuming it is not set again by another script.

The -c switch increases %var once per second.

The -z switch decreases %var until it reaches zero and then unsets it.

-

A better way to time something is store $ctime in a variable when you want to start timing. To determine the elapsed time simply $calc($ctime - %variable)
Posted By: theRat Re: Timing Something? - 30/08/03 10:26 AM
just set a variable to $ctime when you start "timing" and when stopped you decrease the var from current $ctime

00:00:10 Start %start = $ctime = 10
00:10:15 End %end = $ctime = 615

duration = %end - %start = 605
© mIRC Discussion Forums