InsecureRandomContext::randrange

Generate a uniform random duration in the range [0..max). Precondition: max.count() > 0]

Synopsis

Declared in <random.h>

template<StdChronoDuration Dur>
Dur
randrange(std::common_type_t<Dur> range) noexcept;

Return Value

A uniform random duration in [0, range).]

Parameters

NameDescription
rangeThe exclusive upper bound on the duration; its count must be greater than 0.