summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfasttimer_class.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-09-02 19:13:48 -0500
committerDave Parks <davep@lindenlab.com>2010-09-02 19:13:48 -0500
commit7399c39a2fef7ffaa232047bf2ea16ebef682506 (patch)
tree5dc1a16e2914e7312d2ed3a50bd5b7eca3280534 /indra/llcommon/llfasttimer_class.h
parenta32920f627f900e1717959982d942bb54924d4c0 (diff)
Fix for crash when loading models (Don't hit UI from the main thread). Added asserts to LLFastTimer to verify main thread use only.
Diffstat (limited to 'indra/llcommon/llfasttimer_class.h')
-rw-r--r--indra/llcommon/llfasttimer_class.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h
index ddb1a74793..d348888832 100644
--- a/indra/llcommon/llfasttimer_class.h
+++ b/indra/llcommon/llfasttimer_class.h
@@ -37,12 +37,17 @@
#define FAST_TIMER_ON 1
#define TIME_FAST_TIMERS 0
+#define DEBUG_FAST_TIMER_THREADS 1
class LLMutex;
#include <queue>
#include "llsd.h"
+#if DEBUG_FAST_TIMER_THREADS
+void assert_main_thread();
+#endif
+
class LL_COMMON_API LLFastTimer
{
public:
@@ -182,6 +187,9 @@ public:
U64 timer_end = getCPUClockCount64();
sTimerCycles += timer_end - timer_start;
#endif
+#if DEBUG_FAST_TIMER_THREADS
+ assert_main_thread();
+#endif
}
LL_FORCE_INLINE ~LLFastTimer()