absl::AbslParseFlag

Parses a command-line flag string representation text into a Duration value. Duration flags must be specified in a format that is valid input for absl::ParseDuration().

Synopsis

Declared in <absl/time/time.h>

bool
AbslParseFlag(
    std::string_view text,
    Duration* dst,
    std::string* error);

Return Value

true upon successful parsing.

Parameters

NameDescription
textThe flag string to parse.
dstOutput parameter receiving the parsed duration.
errorOutput parameter receiving an error message on failure.