Crate rtss [] [src]

rtss - Relative TimeStamps for Stuff.

An io::Write implementation which prefixes each line with a timestamp since a start time, and the duration since the previous line, if any.

Also a couple of utility functions for formatting Duration, and copying from one IO to another.

Structs

RtssWriter

A writer that prefixes all lines with relative timestamps.

Functions

duration_to_human

Convert a time::Duration to a formatted String such as "15h4m5.42s" or "424.2ms", or "" for a zero duration.

duration_to_human_replace

As duration_to_human, but replacing the contents of a user-provided String.

line_timing_copy

Copy each line from input to output, prepending the output line with elapsed time since start and since the previous line, separated by separator until EOF or IO error.