diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2021-05-17 13:37:13 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-05-17 13:37:13 -0400 |
commit | d313d7021ff551f2a5ef7ec54ff2b3234d96017b (patch) | |
tree | f53604298727a1136ffc5800a65c8cea50706dff /indra/llcrashlogger | |
parent | 87faf258911f5d23416500ff632050ce05b30e3e (diff) |
SL-15200: Add LLApp::sleep(duration) methods.
Two sleep() methods: one accepting F32Milliseconds, or in general any LLUnits
time class; the other accepting any std::chrono::duration.
The significant thing about each of these sleep() methods, as opposed to any
freestanding sleep() function, is that it only sleeps until the app starts
shutdown. Moreover, it returns true if it slept for the whole specified
duration, false if it woke for app shutdown.
This is accomplished by making LLApp::sStatus be an LLScalarCond<EAppStatus>
instead of a plain EAppStatus enum, and by making setStatus() call set_all()
each time the value changes. Then each new sleep() method can call
wait_for_unequal(duration, APP_STATUS_RUNNING).
Introducing llcond.h into llapp.h triggered an #include circularity because
llthread.h #included llapp.h even though it didn't reference anything from it.
Removed. This, in turn, necessitated adding #include "llapp.h" to several .cpp
files that reference LLApp but had been depending on other header files to
drag in llapp.h.
Diffstat (limited to 'indra/llcrashlogger')
-rw-r--r-- | indra/llcrashlogger/llcrashlogger.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index 62fcdaf545..24bf91b595 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -595,7 +595,7 @@ bool LLCrashLogger::init() #if LL_WINDOWS Sleep(1000); #else - sleep(1); + ::sleep(1); #endif locked = mKeyMaster.checkMaster(); } |