Cryload::Duration - cryload 6.0.0

# module Cryload::Duration

##
Overview

Parses the duration syntax shared by `-d`, `--timeout`, `--request-timeout` and `--warmup`. A bare number means seconds, so every v5 invocation keeps working; unit suffixes can be combined (`1h30m`).

##
Extended Modules

- Cryload::Duration

##
Defined in:

cryload/duration.cr

##
Constant Summary

SECONDS_PER_UNIT = `{"ms" => 0.001, "s" => 1.0, "m" => 60.0, "h" => 3600.0}`
TOKEN = `/(\d+(?:\.\d+)?)(ms|s|m|h)/`

##
Instance Method Summary

- #format(span : Time::Span) : String
- #parse(raw : String, flag : String) : Time::Span

##
Instance Method Detail

def format(span : Time::Span) : String #
def parse(raw : String, flag : String) : Time::Span #