blob: d5f7d5dcab4b3ec08f5b7978f1b7832dcea91112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/**
* @file throttle.cpp
* @author Nat Goodspeed
* @date 2024-08-12
* @brief Implementation for ThrottleBase.
*
* $LicenseInfo:firstyear=2024&license=viewerlgpl$
* Copyright (c) 2024, Linden Research, Inc.
* $/LicenseInfo$
*/
// Precompiled header
#include "linden_common.h"
// associated header
#include "throttle.h"
// STL headers
// std headers
// external library headers
// other Linden headers
#include "lltimer.h"
bool ThrottleBase::too_fast()
{
F64 now = LLTimer::getElapsedSeconds();
if (now < mNext)
{
return true;
}
else
{
mNext = now + mInterval;
return false;
}
}
|