FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::venues::RecentSpend Class Reference

What was sent in the last couple of seconds (RateLimiter::kHeaderLagNs), in 125 ms slots. More...

#include <fastmm/venues/rate_limiter.hpp>

Public Member Functions

void add (std::uint32_t n, std::int64_t now) noexcept
 
std::uint32_t since (std::int64_t now, std::int64_t lag) const noexcept
 Sent from now - lag on (whole slots: a little more, never less).
 

Static Public Attributes

static constexpr std::size_t kSlots = 32
 
static constexpr std::int64_t kSlotNs = 125'000'000
 

Detailed Description

What was sent in the last couple of seconds (RateLimiter::kHeaderLagNs), in 125 ms slots.

Member Function Documentation

◆ add()

void fastmm::venues::RecentSpend::add ( std::uint32_t  n,
std::int64_t  now 
)
inlinenoexcept

◆ since()

std::uint32_t fastmm::venues::RecentSpend::since ( std::int64_t  now,
std::int64_t  lag 
) const
inlinenoexcept

Sent from now - lag on (whole slots: a little more, never less).

Member Data Documentation

◆ kSlots

constexpr std::size_t fastmm::venues::RecentSpend::kSlots = 32
staticconstexpr

◆ kSlotNs

constexpr std::int64_t fastmm::venues::RecentSpend::kSlotNs = 125'000'000
staticconstexpr