rate_limiter: typo fix, 'Perdiod'->'Period'

This commit is contained in:
Sébastien Blin committed 2017-10-20 14:51:35 -04:00
1 parent a789ffe7ae
commit fe09146609
1 file changed
+2 -2
+2 -2
View File
@@ -23,12 +23,12 @@
namespace dht {
template<size_t Quota, unsigned long Perdiod=1>
template<size_t Quota, unsigned long Period=1>
class RateLimiter {
public:
/** Clear outdated records and return current quota usage */
size_t maintain(const time_point& now) {
auto limit = now - std::chrono::seconds(Perdiod);
auto limit = now - std::chrono::seconds(Period);
while (not records.empty() and records.front() < limit)
records.pop();
return records.size();