gi-glib-2.0.12: GLib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GLib.Structs.Timer

Contents

Description

Opaque datatype that records a start time.

Synopsis

Exported types

newtype Timer #

Constructors

Timer (ManagedPtr Timer) 

Instances

WrappedPtr Timer # 
((~) * info (ResolveTimerMethod t Timer), MethodInfo * info Timer p) => IsLabel t (Timer -> p) # 

Methods

fromLabel :: Proxy# Symbol t -> Timer -> p #

((~) * info (ResolveTimerMethod t Timer), MethodInfo * info Timer p) => IsLabelProxy t (Timer -> p) # 

Methods

fromLabelProxy :: Proxy Symbol t -> Timer -> p #

HasAttributeList * Timer # 
((~) * signature (m ()), MonadIO m) => MethodInfo * TimerStopMethodInfo Timer signature # 
((~) * signature (m ()), MonadIO m) => MethodInfo * TimerStartMethodInfo Timer signature # 
((~) * signature (m ()), MonadIO m) => MethodInfo * TimerResetMethodInfo Timer signature # 
((~) * signature (CULong -> m Double), MonadIO m) => MethodInfo * TimerElapsedMethodInfo Timer signature # 
((~) * signature (m ()), MonadIO m) => MethodInfo * TimerDestroyMethodInfo Timer signature # 
((~) * signature (m ()), MonadIO m) => MethodInfo * TimerContinueMethodInfo Timer signature # 
type AttributeList Timer # 

Methods

continue

data TimerContinueMethodInfo #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * TimerContinueMethodInfo Timer signature # 

timerContinue #

Arguments

:: (HasCallStack, MonadIO m) 
=> Timer

timer: a Timer.

-> m () 

Resumes a timer that has previously been stopped with timerStop. timerStop must be called before using this function.

Since: 2.4

destroy

data TimerDestroyMethodInfo #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * TimerDestroyMethodInfo Timer signature # 

timerDestroy #

Arguments

:: (HasCallStack, MonadIO m) 
=> Timer

timer: a Timer to destroy.

-> m () 

Destroys a timer, freeing associated resources.

elapsed

data TimerElapsedMethodInfo #

Instances

((~) * signature (CULong -> m Double), MonadIO m) => MethodInfo * TimerElapsedMethodInfo Timer signature # 

timerElapsed #

Arguments

:: (HasCallStack, MonadIO m) 
=> Timer

timer: a Timer.

-> CULong

microseconds: return location for the fractional part of seconds elapsed, in microseconds (that is, the total number of microseconds elapsed, modulo 1000000), or Nothing

-> m Double

Returns: seconds elapsed as a floating point value, including any fractional part.

If timer has been started but not stopped, obtains the time since the timer was started. If timer has been stopped, obtains the elapsed time between the time it was started and the time it was stopped. The return value is the number of seconds elapsed, including any fractional part. The microseconds out parameter is essentially useless.

reset

data TimerResetMethodInfo #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * TimerResetMethodInfo Timer signature # 

timerReset #

Arguments

:: (HasCallStack, MonadIO m) 
=> Timer

timer: a Timer.

-> m () 

This function is useless; it's fine to call timerStart on an already-started timer to reset the start time, so timerReset serves no purpose.

start

data TimerStartMethodInfo #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * TimerStartMethodInfo Timer signature # 

timerStart #

Arguments

:: (HasCallStack, MonadIO m) 
=> Timer

timer: a Timer.

-> m () 

Marks a start time, so that future calls to timerElapsed will report the time since timerStart was called. g_timer_new() automatically marks the start time, so no need to call timerStart immediately after creating the timer.

stop

data TimerStopMethodInfo #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * TimerStopMethodInfo Timer signature # 

timerStop #

Arguments

:: (HasCallStack, MonadIO m) 
=> Timer

timer: a Timer.

-> m () 

Marks an end time, so calls to timerElapsed will return the difference between this end time and the start time.