monky-2.2.0.0: A system state collecting library and application

Maintainerongy
Stabilitytesting
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

Monky.Examples.Utility

Description

This module provides utility functions used in monky modules

Synopsis

Documentation

loopFd Source #

Arguments

:: h

Some kind of module handle

-> Fd

The FD to block on

-> ([MonkyOut] -> IO ())

The update consume function

-> (h -> IO [MonkyOut])

The function to generate the output

-> IO ()

This will loop for you

Utility Function for eventing modules

convertUnit :: Int -> Text -> Text -> Text -> Text -> Text Source #

Convert a number into a fixed length strings

convertUnitB :: Integral a => a -> Text -> Text Source #

Convert a number into a reasonable scale for binary units

convertUnitSI :: Integral a => a -> Text -> Text Source #

Convert a number into a reasonable scale for SI units