This will always result in 0: var %u $calc($ticks - $ticks) Hence the reason it always displays the lag time as 0secs..