I am not sure. It depends on how long between each frame you want. If you use ticks, you can try this code. Every 10 ticks, it will render new frame.
if (ticks mod 10) = 0 [
go
raytracing:render-next-movie-frame
]
I can help during class if you need.