diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2017-03-24 18:25:16 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2017-03-24 18:25:16 -0400 |
commit | 2fe4f6b9187d9153e335bf54ea43fc89a7987459 (patch) | |
tree | 8cb9d97062cdc67bc6a8f277a7735788a2e5375a /indra/llcommon/lleventfilter.h | |
parent | 7af4a49835880fc92461882d5354c0ff12a9672a (diff) |
MAINT-6789: Add LLEventThrottle::getInterval(), setInterval()
plus LLEventBatch::getSize(), setSize()
plus LLEventThrottle::getPostCount() and getDelay().
The interesting thing about LLEventThrottle::setInterval() and
LLEventBatch::setSize() is that either might cause an immediate flush().
Diffstat (limited to 'indra/llcommon/lleventfilter.h')
-rw-r--r-- | indra/llcommon/lleventfilter.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llcommon/lleventfilter.h b/indra/llcommon/lleventfilter.h index 1445b8a3b7..68890846a7 100644 --- a/indra/llcommon/lleventfilter.h +++ b/indra/llcommon/lleventfilter.h @@ -237,6 +237,10 @@ public: // accumulate an event and flush() when big enough virtual bool post(const LLSD& event); + // query or reset batch size + std::size_t getSize() const { return mBatchSize; } + void setSize(std::size_t size); + private: LLSD mBatch; std::size_t mBatchSize; @@ -289,6 +293,16 @@ public: // register an event, may be either passed through or deferred virtual bool post(const LLSD& event); + // query or reset interval + F32 getInterval() const { return mInterval; } + void setInterval(F32 interval); + + // deferred posts + std::size_t getPostCount() const { return mPosts; } + + // time until next event would be passed through, 0.0 if now + F32 getDelay() const { return mTimer.getRemainingTimeF32(); } + private: // remember throttle interval F32 mInterval; |