diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-02 23:57:29 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-02 23:57:29 -0400 |
commit | 48e1979abaecc03af96e7e752e65c645083a4268 (patch) | |
tree | 3d6f361da0d6e03000844e73c37cf3834d44b19b /indra/newview/lluploadfloaterobservers.h | |
parent | c231c97eeefc484b74198ba86251054b7dc0e6bb (diff) |
Introduce LLLater::getRemaining(handle).
Some timer use cases need to know not only whether the timer is active, but
how much time remains before it (next) fires.
Introduce LLLater::mDoneTimes to track, for each handle, the timestamp at
which it's expected to fire. We can't just look up the target timestamp in
mQueue's func_at entry because there's no documented way to navigate from a
handle_type to a node iterator or pointer. Nor can we store it in mHandles
because of order dependency: we need the mDoneTimes iterator so we can bind it
into the Periodic functor for doPeriodically(), but we need the mQueue handle
to store in mHandles. If we could find the mQueue node from the new handle, we
could update the func_at entry after emplace() -- but if we could find the
mQueue node from a handle, we wouldn't need to store the target timestamp
separately anyway.
Split LLLater::doAtTime() into internal doAtTime1() and doAtTime2(): the first
creates an mDoneTimes entry and returns an iterator, the second finishes
creating new mQueue and mHandles entries based on that mDoneTimes entry.
This lets doPeriodically()'s Periodic bind the mDoneTimes iterator. Then
instead of continually incrementing an internal data member, it increments the
mDoneTimes entry to set the next upcoming timestamp. That lets getRemaining()
report the next upcoming timestamp rather than only the original one.
Add LLEventTimer::isRunning() and getRemaining(), forwarding to its LLLater
handle.
Fix various LLEventTimer subclass references to mEventTimer.stop(), etc.
Fix non-inline LLEventTimer subclass tick() overrides for bool, not BOOL.
Remove LLAppViewer::idle() call to LLEventTimer::updateClass(). Since
LLApp::stepFrame() already calls LLCallbackList::callFunctions(), assume we've
already handled that every tick.
Diffstat (limited to 'indra/newview/lluploadfloaterobservers.h')
0 files changed, 0 insertions, 0 deletions