diff options
author | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
commit | b2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch) | |
tree | 3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/llcommon/llframetimer.h | |
parent | Second Life viewer sources 1.14.0.1 (diff) | |
download | meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2 meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz |
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/llcommon/llframetimer.h')
-rw-r--r-- | linden/indra/llcommon/llframetimer.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/linden/indra/llcommon/llframetimer.h b/linden/indra/llcommon/llframetimer.h index 007fe7d..0366e09 100644 --- a/linden/indra/llcommon/llframetimer.h +++ b/linden/indra/llcommon/llframetimer.h | |||
@@ -5,6 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (c) 2002-2007, Linden Research, Inc. | 6 | * Copyright (c) 2002-2007, Linden Research, Inc. |
7 | * | 7 | * |
8 | * Second Life Viewer Source Code | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | 9 | * The source code in this file ("Source Code") is provided by Linden Lab |
9 | * to you under the terms of the GNU General Public License, version 2.0 | 10 | * to you under the terms of the GNU General Public License, version 2.0 |
10 | * ("GPL"), unless you have obtained a separate licensing agreement | 11 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -63,8 +64,7 @@ public: | |||
63 | return sTotalSeconds; | 64 | return sTotalSeconds; |
64 | } | 65 | } |
65 | 66 | ||
66 | // Call this method once per frame to update the current frame | 67 | // Call this method once per frame to update the current frame time. |
67 | // time. | ||
68 | static void updateFrameTime(); | 68 | static void updateFrameTime(); |
69 | 69 | ||
70 | static S32 getFrameCount() { return sFrameCount; } | 70 | static S32 getFrameCount() { return sFrameCount; } |
@@ -72,10 +72,12 @@ public: | |||
72 | static F32 getFrameDeltaTimeF32(); | 72 | static F32 getFrameDeltaTimeF32(); |
73 | 73 | ||
74 | // MANIPULATORS | 74 | // MANIPULATORS |
75 | void start() { reset(); mStarted = TRUE; } | 75 | void start(); |
76 | void stop() { mStarted = FALSE; } | 76 | void stop(); |
77 | void reset() { mStartTime = sFrameTime; mExpiry = sFrameTime; } | 77 | void reset(); |
78 | void setTimerExpirySec(F32 expiration) { mExpiry = expiration + mStartTime; } | 78 | void pause(); |
79 | void unpause(); | ||
80 | void setTimerExpirySec(F32 expiration); | ||
79 | void setExpiryAt(F64 seconds_since_epoch); | 81 | void setExpiryAt(F64 seconds_since_epoch); |
80 | BOOL checkExpirationAndReset(F32 expiration); | 82 | BOOL checkExpirationAndReset(F32 expiration); |
81 | F32 getElapsedTimeAndResetF32() { F32 t = F32(sFrameTime - mStartTime); reset(); return t; } | 83 | F32 getElapsedTimeAndResetF32() { F32 t = F32(sFrameTime - mStartTime); reset(); return t; } |
@@ -85,7 +87,7 @@ public: | |||
85 | // ACCESSORS | 87 | // ACCESSORS |
86 | BOOL hasExpired() const { return (sFrameTime >= mExpiry); } | 88 | BOOL hasExpired() const { return (sFrameTime >= mExpiry); } |
87 | F32 getTimeToExpireF32() const { return (F32)(mExpiry - sFrameTime); } | 89 | F32 getTimeToExpireF32() const { return (F32)(mExpiry - sFrameTime); } |
88 | F32 getElapsedTimeF32() const { return (F32)(sFrameTime - mStartTime); } | 90 | F32 getElapsedTimeF32() const { return mStarted ? (F32)(sFrameTime - mStartTime) : (F32)mStartTime; } |
89 | BOOL getStarted() const { return mStarted; } | 91 | BOOL getStarted() const { return mStarted; } |
90 | 92 | ||
91 | // return the seconds since epoch when this timer will expire. | 93 | // return the seconds since epoch when this timer will expire. |