currentTime : HasIO io => io Integer Get the current time in milliseconds since 1970/01/01.
Visibility: exportdata IntervalID : Type ID used to identify and cancel a running timer.
Totality: total
Visibility: public exportsetInterval : HasIO io => Bits32 -> JSIO () -> io IntervalID Sets a timer to repeatedly carry out the given IO action
after the given number of milliseconds.
Returns an ID, which can be used with `clearInterval` to
cancel the timer.
Visibility: exportclearInterval : HasIO io => IntervalID -> io () Cancel a running timer with the given ID.
Visibility: exportDTime : Type Alias for a time delta in milliseconds
Visibility: public exportanimate : HasIO io => (DTime -> JSIO ()) -> io (IO ()) Use `window.requestAnimationFrame` to repeatedly
animate the given function.
The function takes the time delta (in milliseconds) since
the previous animation step as input.
Returns a cleanup action, which can be run to
stop the running animation.
Visibility: exportshowFPS : Bits32 -> String- Visibility: export
fps : Nat -> MSF m DTime (Event Bits32) Averages the frames per second (FPS) of an animation
firing an event with the value every `n` steps.
Visibility: export