blob: deb0a26fb02adf32cd8058fcbc17575f8d3d053d (
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;
}
}
|