hosc-0.9: Haskell Open Sound Control

Sound.OpenSoundControl.Time

Description

Temporal representations and clock operations (read current time and pause thread).

Synopsis

Documentation

data Time Source

Time is represented in either UTC or NTP form.

Constructors

UTCr Double 
NTPr Double 
NTPi Integer 

Instances

Eq Time 
Ord Time

Times can be ordered, avoid coercion if not required.

Show Time 

as_ntpi :: Time -> IntegerSource

Coerce to NTPi form.

as_utcr :: Time -> DoubleSource

Coerce to UTCr form.

ntpr_ntpi :: Double -> IntegerSource

Convert a real-valued NTP timestamp to an NTP timestamp.

ntpi_ntpr :: Integer -> DoubleSource

Convert an NTP timestamp to a real-valued NTP timestamp.

utcr_ntpi :: Double -> IntegerSource

Convert UTC timestamp to NTP timestamp.

ntpr_utcr :: Double -> DoubleSource

Convert NTP timestamp to UTC timestamp.

ntpi_utcr :: Integer -> DoubleSource

Convert NTP timestamp to UTC timestamp.

utc_base :: UTCTimeSource

The time at 1970-01-01:00:00:00.

utcr :: IO DoubleSource

Read current UTCr timestamp.

ntpi :: IO IntegerSource

Read current NTP timestamp.

pauseThread :: Double -> IO ()Source

Pause current thread for the indicated duration, given in seconds.

pauseThreadUntil :: Double -> IO ()Source

Pause current thread until the given utcr time.

immediately :: TimeSource

Execute the bundle immediately.