#include "net/dcsctp/timer/timer.h"
#include <algorithm>
#include <cstdint>
#include <limits>
#include <memory>
#include <utility>
#include "absl/memory/memory.h"
#include "absl/strings/string_view.h"
#include "net/dcsctp/public/timeout.h"
#include "rtc_base/checks.h"
namespace dcsctp {
namespace {
TimeDelta;
TimeoutID MakeTimeoutId(TimerID timer_id, TimerGeneration generation) { … }
TimeDelta GetBackoffDuration(const TimerOptions& options,
TimeDelta base_duration,
int expiration_count) { … }
}
constexpr TimeDelta Timer::kMaxTimerDuration;
Timer::Timer(TimerID id,
absl::string_view name,
OnExpired on_expired,
UnregisterHandler unregister_handler,
std::unique_ptr<Timeout> timeout,
const TimerOptions& options)
: … { … }
Timer::~Timer() { … }
void Timer::Start() { … }
void Timer::Stop() { … }
void Timer::Trigger(TimerGeneration generation) { … }
void TimerManager::HandleTimeout(TimeoutID timeout_id) { … }
std::unique_ptr<Timer> TimerManager::CreateTimer(absl::string_view name,
Timer::OnExpired on_expired,
const TimerOptions& options) { … }
}