LeviLamina
Loading...
Searching...
No Matches
Timer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5class Timer {
6public:
7 // member variables
8 // NOLINTBEGIN
9 ::ll::TypedStorage<4, 4, float> mTicksPerSecond;
10 ::ll::TypedStorage<4, 4, int> mTicks;
11 ::ll::TypedStorage<4, 4, float> mAlpha;
12 ::ll::TypedStorage<4, 4, float> mTimeScale;
13 ::ll::TypedStorage<4, 4, float> mPassedTime;
14 ::ll::TypedStorage<4, 4, float> mFrameStepAlignmentRemainder;
15 ::ll::TypedStorage<4, 4, float> mLastTimestep;
16 ::ll::TypedStorage<4, 4, float> mOverflowTime;
17 ::ll::TypedStorage<8, 8, int64> mLastMs;
18 ::ll::TypedStorage<8, 8, int64> mLastMsSysTime;
19 ::ll::TypedStorage<8, 8, int64> mLastTimeMs;
20 ::ll::TypedStorage<4, 4, float> mAdjustTime;
21 ::ll::TypedStorage<4, 4, float> mSteppingTick;
22 ::ll::TypedStorage<8, 64, ::std::function<int64()>> mGetTimeMSCallback;
23 // NOLINTEND
24
25public:
26 // prevent constructor by default
27 Timer();
28
29public:
30 // member functions
31 // NOLINTBEGIN
32 MCAPI Timer(float ticksPerSecond, ::std::function<int64()> getTimeMSCallback);
33
34 MCAPI void advanceTime(float preferredFrameStep);
35 // NOLINTEND
36
37public:
38 // static functions
39 // NOLINTBEGIN
40 MCAPI static int64 getMillisecondsSinceLaunch();
41 // NOLINTEND
42
43public:
44 // constructor thunks
45 // NOLINTBEGIN
46 MCAPI void* $ctor(float ticksPerSecond, ::std::function<int64()> getTimeMSCallback);
47 // NOLINTEND
48};