1+ /*
2+ * Copyright 2025 Lambda
3+ *
4+ * This program is free software: you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation, either version 3 of the License, or
7+ * (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 General Public License for more details.
13+ *
14+ * You should have received a copy of the GNU General Public License
15+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
16+ */
17+
18+ package com.lambda.module.modules.debug
19+
20+ import com.lambda.event.events.ClientEvent
21+ import com.lambda.event.listener.SafeListener.Companion.listen
22+ import com.lambda.event.listener.SafeListener.Companion.listenConcurrently
23+ import com.lambda.module.Module
24+ import com.lambda.module.tag.ModuleTag
25+ import com.lambda.util.Communication.info
26+ import com.lambda.util.KeyCode
27+ import net.minecraft.block.Blocks
28+ import net.minecraft.util.math.BlockPos
29+ import java.awt.Color
30+
31+ object TimerTest : Module(
32+ name = " TimerTest" ,
33+ defaultTags = setOf(ModuleTag .DEBUG )
34+ ) {
35+ private var last = 0L
36+
37+ init {
38+ listen<ClientEvent .FixedTick > {
39+ val now = System .currentTimeMillis()
40+ info(" ${now - last} - Fixed Tick on game thread" )
41+ last = now
42+ }
43+
44+ listenConcurrently<ClientEvent .FixedTick > {
45+ // info("${System.currentTimeMillis()} - Fixed Tick Concurrently (but not on mc game thread)")
46+ }
47+ }
48+ }
0 commit comments