LeviLamina
Loading...
Searching...
No Matches
PlayerRenderChunkModificationLatencyTracker.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/threading/Mutex.h"
7#include "mc/world/level/BlockPos.h"
8#include "mc/world/level/SubChunkPos.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPos;
13class SubChunkPos;
14namespace Bedrock::Threading { class Mutex; }
15// clang-format on
16
18public:
19 // PlayerRenderChunkModificationLatencyTracker inner types declare
20 // clang-format off
21 struct TimeDelta;
22 struct TimeMarker;
23 // clang-format on
24
25 // PlayerRenderChunkModificationLatencyTracker inner types define
26 struct TimeDelta {
27 public:
28 // member variables
29 // NOLINTBEGIN
32 // NOLINTEND
33
34 public:
35 // prevent constructor by default
36 TimeDelta& operator=(TimeDelta const&);
37 TimeDelta(TimeDelta const&);
38 TimeDelta();
39 };
40
41 struct TimeMarker {
42 public:
43 // member variables
44 // NOLINTBEGIN
47 // NOLINTEND
48
49 public:
50 // prevent constructor by default
51 TimeMarker& operator=(TimeMarker const&);
52 TimeMarker(TimeMarker const&);
53 TimeMarker();
54
55 public:
56 // member functions
57 // NOLINTBEGIN
58 MCNAPI ~TimeMarker();
59 // NOLINTEND
60
61 public:
62 // destructor thunk
63 // NOLINTBEGIN
64 MCNAPI void $dtor();
65 // NOLINTEND
66 };
67
68 using TimeStamp = ::std::chrono::steady_clock::time_point;
69
70public:
71 // member variables
72 // NOLINTBEGIN
73 ::ll::TypedStorage<1, 1, bool> mTimingIsActive;
74 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mStartTime;
75 ::ll::TypedStorage<8, 24, ::std::vector<::PlayerRenderChunkModificationLatencyTracker::TimeMarker>> mTimeMarkers;
76 ::ll::TypedStorage<4, 12, ::BlockPos> mBlockToTrack;
77 ::ll::TypedStorage<4, 12, ::SubChunkPos> mRenderChunkPosToTrack;
78 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMutex;
79 // NOLINTEND
80
81public:
82 // member functions
83 // NOLINTBEGIN
84 MCNAPI void addTimeMarker(::std::string_view name);
85
86 MCNAPI void clearData();
87
88#ifdef LL_PLAT_C
89 MCNAPI bool shouldTrackNearbyPosition(::BlockPos const& blockToTrack);
90
91 MCNAPI bool shouldTrackPosition(::BlockPos const& blockToTrack);
92
93 MCNAPI bool shouldTrackPosition(::SubChunkPos const& renderChunkPos);
94#endif
95
96 MCNAPI void startTimer(::BlockPos const& blockToTrack);
97 // NOLINTEND
98
99public:
100 // static functions
101 // NOLINTBEGIN
102#ifdef LL_PLAT_C
103 MCNAPI static ::PlayerRenderChunkModificationLatencyTracker* getIfTiming();
104#endif
105 // NOLINTEND
106};
Definition Mutex.h:10
Definition BlockPos.h:19
Definition PlayerRenderChunkModificationLatencyTracker.h:17
MCAPI void addTimeMarker(::std::string_view name)
MCAPI void startTimer(::BlockPos const &blockToTrack)
Definition SubChunkPos.h:5
Definition PlayerRenderChunkModificationLatencyTracker.h:26
Definition PlayerRenderChunkModificationLatencyTracker.h:41
Definition Alias.h:14