Idris2Doc : System.Posix.Timer.Prim

System.Posix.Timer.Prim

(source)

Reexports

importpublic Data.C.Integer
importpublic System.Posix.Errno
importpublic System.Posix.Timer.Types
importpublic System.Posix.Time

Definitions

clock : PrimIOClockT
  Returns an approximation of processor time used by the program.

Type `ClockT` measures time with a granularity of
`CLOCKS_PER_SEC`.
setitimer : Which->IOTimerval->IOTimerval->EPrim ()
  This sets `new` as the new timer and places the current timer for
`Which` in `old`.

Depending on `Which`, the timer will use a different clock and
will (possibly repeatedly) raise a different kind signal:

* ITIMER_REAL: Counts down in real (i.e. wall clock) time
and raises SIGALRM
* ITIMER_VIRTUAL: Counts down in process virtual time
(i.e. user-mode CPU time) and raises SIGVTALRM
* ITIMER_PROF: Counts down in process time
(i.e. the sum of kernel-mode and user-mode CPU time) and raises SIGPROF

Totality: total
Visibility: export
getitimer : Which->IOTimerval->PrimIO ()
  Writes the currently set timer for `Which` into `old.

Totality: total
Visibility: export
alarm : UInt->PrimIOUInt
  A very basic version of `setitimer` that raises `SIGALRM`
after the given number of seconds.

The returned value is the remaining number of seconds on any
previously set timer. The timer can be disabled by setting
this to zero.
clockGetTime : ClockId->IOTimespec->EPrim ()
  Writes the current time for the given clock into the
`IOTimespec` pointer.

Totality: total
Visibility: export
clockGetRes : ClockId->IOTimespec->EPrim ()
  Writes the resolution for the given clock into the
`IOTimespec` pointer.

Totality: total
Visibility: export
nanosleep_ : IOTimespec->IOTimespec->EPrim ()
  High resolution sleeping for the duration given in `dur`.

In case this is interrupted by a signal, it returns `Left EINTR`
and writes the remaining duration into `rem`.

Totality: total
Visibility: export
clockNanosleep : ClockId->IOTimespec->IOTimespec->EPrim ()
  Like `nanosleep` but allows us to specify the system clock to use.

Totality: total
Visibility: export
clockNanosleepAbs : ClockId->IOTimespec->EPrim ()
  Like `clockNanosleep` but uses an absolute time value instead of a duration.

This is useful to get exact wakeup times even in case of lots of signal
interrupts.

Totality: total
Visibility: export
ClockTpe : ClockId->ClockType
Totality: total
Visibility: public export
IClock : ClockId->Type
Totality: total
Visibility: public export
setTimer : Which->Timerval->EPrim ()
  Like `setitimer` but does not store the old timer in a pointer.

Totality: total
Visibility: export
getTimer : Which->EPrimTimerval
  Returns the currently set timer for `Which`.

Totality: total
Visibility: export
getTime : (c : ClockId) ->EPrim (IClockc)
  Returns the current time for the given clock.

Totality: total
Visibility: export
getResolution : (c : ClockId) ->EPrim (IClockc)
  Returns the resolution for the given clock.

Totality: total
Visibility: export
nanosleep : ClockMonotonic->EPrim ()
  Like `nanosleep` but without the capability of keeping track of the
remaining duration in case of a signal interrupt.

Totality: total
Visibility: export