LeviLamina
Loading...
Searching...
No Matches
BasicTimer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5class BasicTimer {
6public:
7 // member variables
8 // NOLINTBEGIN
9 ::ll::TypedStorage<8, 8, double> mTimeDelay;
10 ::ll::TypedStorage<8, 8, double> mStartTime;
11 ::ll::TypedStorage<8, 64, ::std::function<double()>> mGetCurrentTimeCallback;
12 // NOLINTEND
13
14#ifdef LL_PLAT_S
15public:
16 // prevent constructor by default
17 BasicTimer();
18
19#else // LL_PLAT_C
20public:
21 // prevent constructor by default
22 BasicTimer& operator=(BasicTimer const&);
23 BasicTimer(BasicTimer const&);
24 BasicTimer();
25
26#endif
27public:
28 // member functions
29 // NOLINTBEGIN
30 MCAPI BasicTimer(double timeDelay, ::std::function<double()> getTimeCallback);
31
32#ifdef LL_PLAT_C
33 MCAPI bool hasExpired() const;
34
35 MCAPI ::BasicTimer& operator=(::BasicTimer&&);
36
37 MCAPI void resetTime();
38#endif
39
40 MCAPI ~BasicTimer();
41 // NOLINTEND
42
43public:
44 // static functions
45 // NOLINTBEGIN
46 MCAPI static double getSecondsSinceLaunch();
47 // NOLINTEND
48
49public:
50 // constructor thunks
51 // NOLINTBEGIN
52 MCAPI void* $ctor(double timeDelay, ::std::function<double()> getTimeCallback);
53 // NOLINTEND
54
55public:
56 // destructor thunk
57 // NOLINTBEGIN
58 MCFOLD void $dtor();
59 // NOLINTEND
60};