From Scriptwiki
Jump to: navigation, search

Returns the number of ticks since your operating system was first started.


Note that you can use this as milliseconds, as one tick is one millisecond.


; You can use $ticks to calculate the time a script did need.
; lets make a new alias called testtime
alias testtime {
 ; at first, we need to save the current $ticks
 var %ticks = $ticks, %i = 1, %test
 ; lets "increase" %test 1000 times with the help of a while loop 
 while (%i <= 1000) {
  %test = $calc(%test + 1)
  inc %i
 ; now we can echo the time this script did need by calculating the current $ticks minus the one we have saved in %ticks. 
 echo -a This took: $calc($ticks - %ticks) milliseconds.