haskus-system-0.6.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.Arch.Linux.Time

Description

Linux time

Synopsis

Documentation

data TimeSpec Source #

Time spec

Constructors

TimeSpec 

data TimeVal Source #

Time val

Constructors

TimeVal 

Instances

timeValDiff :: TimeVal -> TimeVal -> Word64 Source #

Timeval difference in microseconds

data Clock Source #

Clocks

Constructors

ClockWall

System-wide wall clock

ClockMonotonic

Monotonic clock from unspecified starting point

ClockProcess

Per-process CPU-time clock (CPU time consumed by all threads in the process)

ClockThread

Thread-specific CPU-time clock

ClockRawMonotonic

Hardware-based monotonic clock

ClockCoarseWall

Faster but less precise wall clock

ClockCoarseMonotonic

Faster but less precise monotonic clock

ClockBoot

Monotonic clock that includes any time that the system is suspended

ClockWallAlarm

Like wall clock, but timers on this clock can wake-up a suspended system

ClockBootAlarm

Like boot clock, but timers on this clock can wake-up a suspended system

ClockTAI

Like wall clock but in International Atomic Time

sysClockGetTime :: MonadInIO m => Clock -> Flow m '[TimeSpec, ErrorCode] Source #

Retrieve clock time

sysClockSetTime :: MonadInIO m => Clock -> TimeSpec -> Flow m '[(), ErrorCode] Source #

Set clock time

sysClockGetResolution :: MonadInIO m => Clock -> Flow m '[TimeSpec, ErrorCode] Source #

Retrieve clock resolution

sysGetTimeOfDay :: MonadInIO m => Flow m '[TimeVal, ErrorCode] Source #

Retrieve time of day

sysSetTimeOfDay :: MonadInIO m => TimeVal -> Flow m '[(), ErrorCode] Source #

Set time of day

sysNanoSleep :: MonadInIO m => TimeSpec -> Flow m '[SleepResult, ErrorCode] Source #

Suspend the calling thread for the specified amount of time

Can be interrupted by a signal (in this case it returns the remaining time)

nanoSleep :: MonadInIO m => TimeSpec -> Flow m '[(), ErrorCode] Source #

Suspend the calling thread for the specified amount of time

When interrupted by a signal, suspend again for the remaining amount of time