diff options
| author | Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> | 2026-03-13 18:46:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-13 18:46:24 +0200 |
| commit | 5ffcdc3c9c3b33e04dbaa7397fc73d53857acd5b (patch) | |
| tree | e43e071daaa9f41a4d8e440d136e6e42b634db6e /indra/llcommon/lleventcoro.cpp | |
| parent | 28958ab7ae368d53b21888d178a9eb04ac6d82d2 (diff) | |
| parent | 419f94f9a975fb117facb94534509c9e83727549 (diff) | |
Merge pull request #5539 from secondlife/marchcat/slua-26.1-webrtc
26.1 -> SLua PV merge
Diffstat (limited to 'indra/llcommon/lleventcoro.cpp')
| -rw-r--r-- | indra/llcommon/lleventcoro.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp index e1fc4764f6..bb2cd4fb2e 100644 --- a/indra/llcommon/lleventcoro.cpp +++ b/indra/llcommon/lleventcoro.cpp @@ -137,6 +137,18 @@ void llcoro::suspendUntilTimeout(float seconds) suspendUntilEventOnWithTimeout(bogus, seconds, timedout); } +void llcoro::suspendUntilNextFrame() +{ + LLCoros::checkStop(); + LLCoros::TempStatus st("waiting for next frame"); + + // Listen for the next event on the "mainloop" event pump. + // Once per frame we get mainloop.post(newFrame); + LLEventPumpOrPumpName mainloop_pump("mainloop"); + // Wait for the next event (the event data is ignored). + suspendUntilEventOn(mainloop_pump); +} + namespace { |
