namespace = FNmathutils\frame

; $\FNmathutils\frame\fps = 6
; $\FNmathutils\frame\end = 2
; run = commandlist\FNmathutils\frame\run
; result = $\FNmathutils\frame\result

[Constants]
global $fps
global $start = 0
global $end
global $result
global $offset = 0

[CommandListRun]
$result = ((time+$offset) * $fps % ($end - $start + 1) + $start) // 1
$fps = 0
$start = 0
$end = 0
$offset = 0