microtimer-0.0.1.2: A tiny library for benchmarking IO actions.

PortabilityGHC
Stabilityexperimental
Maintaineraseipp@pobox.com
Safe HaskellNone

System.Microtimer

Contents

Description

A tiny module for measuring the time taken by an IO action.

This module is a almost a direct copy of the Criterion.Measurement module from the criterion package, written by Bryan O'Sullivan.

Synopsis

Timing IO actions.

time :: IO a -> IO (Double, a)Source

Time an IO action and return the time taken for execution, as well as the return value.

time_ :: IO a -> IO DoubleSource

Time an IO action, throwing away the result and returning the time taken for execution.

Formatting timing results.

formatSeconds :: Double -> StringSource

Convert a Double value into a String which specifies how long something took in seconds.