diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/llframetimer.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llframetimer.cpp b/linden/indra/llcommon/llframetimer.cpp index 9de3be2..96e5014 100644 --- a/linden/indra/llcommon/llframetimer.cpp +++ b/linden/indra/llcommon/llframetimer.cpp | |||
@@ -140,3 +140,18 @@ F32 LLFrameTimer::getFrameDeltaTimeF32() | |||
140 | { | 140 | { |
141 | return (F32)(U64_to_F64(sFrameDeltaTime) * USEC_TO_SEC_F64); | 141 | return (F32)(U64_to_F64(sFrameDeltaTime) * USEC_TO_SEC_F64); |
142 | } | 142 | } |
143 | |||
144 | |||
145 | // static | ||
146 | // Return seconds since the current frame started | ||
147 | F32 LLFrameTimer::getCurrentFrameTime() | ||
148 | { | ||
149 | U64 frame_time = totalTime() - sTotalTime; | ||
150 | return (F32)(U64_to_F64(frame_time) * USEC_TO_SEC_F64); | ||
151 | } | ||
152 | |||
153 | // Glue code to avoid full class .h file #includes | ||
154 | F32 getCurrentFrameTime() | ||
155 | { | ||
156 | return (F32)(LLFrameTimer::getCurrentFrameTime()); | ||
157 | } | ||