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 -> Int64 -> m ()
- timeValFromIso8601 :: MonadIO m => Text -> m (Bool, TimeVal)
- data TimeValToIso8601MethodInfo
- timeValToIso8601 :: MonadIO m => TimeVal -> m Text
- timeValReadTvSec :: TimeVal -> IO Int64
- timeValReadTvUsec :: TimeVal -> IO Int64
Exported types
((~) * info (ResolveTimeValMethod t TimeVal), MethodInfo * info TimeVal p) => IsLabel t (TimeVal -> p) Source | |
((~) * info (ResolveTimeValMethod t TimeVal), MethodInfo * info TimeVal p) => IsLabelProxy t (TimeVal -> p) Source | |
((~) (TYPE Lifted) signature (m Text), MonadIO m) => MethodInfo (TYPE Lifted) TimeValToIso8601MethodInfo TimeVal signature Source | |
((~) (TYPE Lifted) signature (Int64 -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) TimeValAddMethodInfo TimeVal signature Source | |
newZeroTimeVal :: MonadIO m => m TimeVal Source
Construct a TimeVal
struct initialized to zero.
Methods
timeValAdd
data TimeValAddMethodInfo Source
((~) (TYPE Lifted) signature (Int64 -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) TimeValAddMethodInfo TimeVal signature Source | |
timeValAdd :: MonadIO m => TimeVal -> Int64 -> m () Source
timeValFromIso8601
timeValToIso8601
data TimeValToIso8601MethodInfo Source
((~) (TYPE Lifted) signature (m Text), MonadIO m) => MethodInfo (TYPE Lifted) TimeValToIso8601MethodInfo TimeVal signature Source | |
timeValToIso8601 :: MonadIO m => TimeVal -> m Text Source
Properties
TvSec
timeValReadTvSec :: TimeVal -> IO Int64 Source
TvUsec
timeValReadTvUsec :: TimeVal -> IO Int64 Source