Function russell_lab::format_nanoseconds[][src]

pub fn format_nanoseconds(nanoseconds: u128) -> String
Expand description

Returns a nice string representing the value in nanoseconds

Panics

This function may panic if the write! macro fails (rarely)

Example

use russell_lab::*;
let res = format_nanoseconds(3_723_000_000_000);
assert_eq!(res, "1h2m3s");