Fix classique titles display
[ryzomcore.git] / ryzom / client / src / scalable_time.h
blob707033f7ec8eb0e991aa9efdd3efc0c33c5d021b
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CL_SCALABLE_TIME_H
20 #define CL_SCALABLE_TIME_H
22 #include "nel/misc/time_nl.h"
24 /** Allow to get the current time, and to change the time factor
26 class CScalableTime
28 public:
29 CScalableTime();
30 // get local time with time scale applied
31 NLMISC::TTime getScaledLocalTime();
32 // get performance time with time scale applied;
33 NLMISC::TTicks getScaledPerformanceTime();
34 void setTimeScale(float scale);
35 float getTimeScale() const { return _TimeScale; }
36 private:
37 NLMISC::TTicks _LastPerformanceTime;
38 double _ScaledPerformanceTime;
39 float _TimeScale;
40 void update();
48 #endif