monky-2.1.0.0: A system state collecting library and application

PortabilityLinux
Stabilitytesting
Maintainerongy
Safe HaskellNone

Monky.Examples.Utility

Description

This module provides utility functions used in monky modules

Synopsis

Documentation

loopFdSource

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 -> TextSource

Convert a number into a fixed length strings

convertUnitB :: Integral a => a -> Text -> TextSource

Convert a number into a reasonable scale for binary units

convertUnitSI :: Integral a => a -> Text -> TextSource

Convert a number into a reasonable scale for SI units