SFML-2.3.2.2: SFML bindings

Safe HaskellNone
LanguageHaskell98

SFML.System.Clock

Synopsis

Documentation

newtype Clock Source

Constructors

Clock (Ptr Clock) 

createClock :: IO Clock Source

Create a new clock and start it.

copy :: SFCopyable a => a -> IO a Source

Copy the given SFML resource.

destroy :: SFResource a => a -> IO () Source

Destroy the given SFML resource.

getElapsedTime :: Clock -> IO Time Source

Get the time elapsed in a clock.

This function returns the time elapsed since the last call to sfClock_restart (or the construction of the object if sfClock_restart has not been called).

restartClock :: Clock -> IO Time Source

Restart a clock.

This function puts the time counter back to zero. It also returns the time elapsed since the clock was started.