nanoMMO
0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
backoff.h
Go to the documentation of this file.
1
#ifndef NANOMMO_BOT_BACKOFF_H_
2
#define NANOMMO_BOT_BACKOFF_H_
3
4
#include <chrono>
5
#include <random>
6
7
namespace
nanommo
{
8
9
/// How long a bot waits to log in again, after `failed` tries that failed in
10
/// a row: a second, twice that after each failure, up to thirty, and of that
11
/// a random part, from half to all of it, so that bots dropped together don't
12
/// all come back together, each time.
13
std::chrono::milliseconds
Backoff
(
int
failed, std::mt19937& random);
14
15
}
// namespace nanommo
16
17
#endif
// NANOMMO_BOT_BACKOFF_H_
nanommo
Definition
chat.cc:9
nanommo::Backoff
std::chrono::milliseconds Backoff(int failed, std::mt19937 &random)
Definition
backoff.cc:9
bot
backoff.h
Generated by
1.15.0