[#InsecureRandomContext-rand_exp_duration] = xref:InsecureRandomContext.adoc[InsecureRandomContext]::rand_exp_duration :relfileprefix: ../ :mrdocs: Return a duration sampled from an exponential distribution (https://en.wikipedia.org/wiki/Exponential_distribution). Successive events whose intervals are distributed according to this form a memoryless Poisson process. This should be used for repeated network events (e.g. sending a certain type of message) to minimize leaking information to observers. == Synopsis Declared in `<random.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::chrono::microseconds rand_exp_duration(std::chrono::microseconds mean) noexcept; ---- == Description The probability of an event occurring before time x is 1 ‐ eˆ‐(x/a) where a is the average interval between events. == Return Value A duration sampled from an exponential distribution with the given mean. == Parameters [cols="1,4"] |=== | Name| Description | *mean* | The average interval between events. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#