aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llframetimer.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llcommon/llframetimer.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/llcommon/llframetimer.cpp')
-rw-r--r--linden/indra/llcommon/llframetimer.cpp15
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
147F32 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
154F32 getCurrentFrameTime()
155{
156 return (F32)(LLFrameTimer::getCurrentFrameTime());
157}