Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Represents a precise time, with seconds and microseconds. Similar to the struct timeval returned by the gettimeofday() UNIX system call.
GLib is attempting to unify around the use of 64bit integers to represent microsecond-precision time. As such, this type will be removed from a future version of GLib.
- newtype TimeVal = TimeVal (ForeignPtr TimeVal)
- newZeroTimeVal :: MonadIO m => m TimeVal
- noTimeVal :: Maybe TimeVal
- data TimeValAddMethodInfo
- timeValAdd :: MonadIO m => TimeVal -> CLong -> m ()
- timeValFromIso8601 :: MonadIO m => Text -> m (Bool, TimeVal)
- data TimeValToIso8601MethodInfo
- timeValToIso8601 :: MonadIO m => TimeVal -> m Text
- timeValReadTvSec :: MonadIO m => TimeVal -> m CLong
- timeValTvSec :: AttrLabelProxy "tvSec"
- timeValWriteTvSec :: MonadIO m => TimeVal -> CLong -> m ()
- timeValReadTvUsec :: MonadIO m => TimeVal -> m CLong
- timeValTvUsec :: AttrLabelProxy "tvUsec"
- timeValWriteTvUsec :: MonadIO m => TimeVal -> CLong -> m ()
Exported types
WrappedPtr TimeVal | |
(~) AttrOpTag tag AttrSet => Constructible TimeVal tag | |
((~) * signature (m Text), MonadIO m) => MethodInfo * TimeValToIso8601MethodInfo TimeVal signature | |
((~) * signature (CLong -> m ()), MonadIO m) => MethodInfo * TimeValAddMethodInfo TimeVal signature | |
((~) * info (ResolveTimeValMethod t TimeVal), MethodInfo * info TimeVal p) => IsLabelProxy t (TimeVal -> p) | |
type AttributeList TimeVal |
newZeroTimeVal :: MonadIO m => m TimeVal Source
Construct a TimeVal
struct initialized to zero.
Methods
timeValAdd
data TimeValAddMethodInfo Source
((~) * signature (CLong -> m ()), MonadIO m) => MethodInfo * TimeValAddMethodInfo TimeVal signature |
timeValAdd :: MonadIO m => TimeVal -> CLong -> m () Source
timeValFromIso8601
timeValToIso8601
data TimeValToIso8601MethodInfo Source
((~) * signature (m Text), MonadIO m) => MethodInfo * TimeValToIso8601MethodInfo TimeVal signature |
timeValToIso8601 :: MonadIO m => TimeVal -> m Text Source
Properties
TvSec
timeValReadTvSec :: MonadIO m => TimeVal -> m CLong Source
timeValTvSec :: AttrLabelProxy "tvSec" Source
timeValWriteTvSec :: MonadIO m => TimeVal -> CLong -> m () Source
TvUsec
timeValReadTvUsec :: MonadIO m => TimeVal -> m CLong Source
timeValTvUsec :: AttrLabelProxy "tvUsec" Source
timeValWriteTvUsec :: MonadIO m => TimeVal -> CLong -> m () Source