Private
Public Access
1
0

change stopwatch threshold to 50ms

This commit is contained in:
2026-03-30 00:30:24 +02:00
parent b8e8533699
commit 40f7b148ac
4 changed files with 7 additions and 7 deletions

View File

@@ -142,9 +142,9 @@ public class BlockEntityReusableBeehive : BlockEntityContainer, IModEntity
stopwatch.Restart(); stopwatch.Restart();
UpdateGreenhouseStatus(); UpdateGreenhouseStatus();
stopwatch.LogTime(this, 0.02, "after greenhouse"); stopwatch.LogTime(this, 0.05, "after greenhouse");
UpdateStatsText(); UpdateStatsText();
stopwatch.LogTime(this, 0.02, "after stats"); stopwatch.LogTime(this, 0.05, "after stats");
if (Api.Side == EnumAppSide.Client) if (Api.Side == EnumAppSide.Client)
return; return;
@@ -613,7 +613,7 @@ public class BlockEntityReusableBeehive : BlockEntityContainer, IModEntity
?? SelectBiasedCandidate(floorCandidates)) ?? SelectBiasedCandidate(floorCandidates))
?? SelectBiasedCandidate(ceilingCandidates); ?? SelectBiasedCandidate(ceilingCandidates);
stopwatch.StopAndLogTime(this, 0.01); stopwatch.StopAndLogTime(this, 0.05);
if (selected == null) if (selected == null)
return false; return false;

View File

@@ -280,7 +280,7 @@ public class PlantPositionRegistryModSystem2 : ModSystem, IPlantPositionRegistry
} }
} }
stopwatch.StopAndLogTime(this, 0.01); stopwatch.StopAndLogTime(this, 0.05);
} }
/// <summary> /// <summary>

View File

@@ -317,14 +317,14 @@ public class BlockEntityBehaviorBeeSwarm(BlockEntity blockEntity) : BlockEntityB
for (var i = 0; i < totalDelta / 0.1f; i++) for (var i = 0; i < totalDelta / 0.1f; i++)
bee.Step(0.1f, 0.1f); // todo bee.Step(0.1f, 0.1f); // todo
} }
stopwatch.StopAndLogTime(this, 0.01); stopwatch.StopAndLogTime(this, 0.05);
} }
private void OnTick(float dt) private void OnTick(float dt)
{ {
stopwatch.Restart(); stopwatch.Restart();
Update(dt); Update(dt);
stopwatch.StopAndLogTime(this, 0.02); stopwatch.StopAndLogTime(this, 0.05);
} }
private void Update(float dt) private void Update(float dt)

View File

@@ -189,7 +189,7 @@ public class BlockEntityBehaviorRoamingBees(BlockEntity blockEntity) : BlockEnti
for (var i = 0; i < totalDelta / 0.1f; i++) for (var i = 0; i < totalDelta / 0.1f; i++)
bee.Step(0.1f, 0.1f); // todo bee.Step(0.1f, 0.1f); // todo
} }
stopwatch.StopAndLogTime(this, 0.01); stopwatch.StopAndLogTime(this, 0.05);
} }
public void Clear() public void Clear()