diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index f52dc09630..678ca982b5 100755 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -79,7 +79,7 @@ namespace OpenRA var sw = new Stopwatch(); currentActivity = a.Tick(this) ?? new Idle(); var dt = sw.ElapsedTime(); - if( dt > 0.001 ) + if(dt > Game.Settings.Debug.LongTickThreshold) Log.Write("perf", "[{2}] Activity: {0} ({1:0.000} ms)", a, dt * 1000, Game.LocalTick); if (a == currentActivity) break; diff --git a/OpenRA.Game/GameRules/Settings.cs b/OpenRA.Game/GameRules/Settings.cs index 8a2a374b16..e8696cb7e4 100755 --- a/OpenRA.Game/GameRules/Settings.cs +++ b/OpenRA.Game/GameRules/Settings.cs @@ -33,6 +33,7 @@ namespace OpenRA.GameRules public bool PerfGraph = false; public bool RecordSyncReports = true; public bool ShowCollisions = false; + public float LongTickThreshold = 0.001f; } public class GraphicSettings diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index e9f76122fb..de83d33f2c 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -150,9 +150,9 @@ namespace OpenRA Queries.WithTraitMultiple().DoTimed( x => { x.Trait.Tick( x.Actor ); - }, "[{2}] Trait: {0} ({1:0.000} ms)", 0.001 ); + }, "[{2}] Trait: {0} ({1:0.000} ms)", Game.Settings.Debug.LongTickThreshold ); - effects.DoTimed( e => e.Tick( this ), "[{2}] Effect: {0} ({1:0.000} ms)", 0.001 ); + effects.DoTimed( e => e.Tick( this ), "[{2}] Effect: {0} ({1:0.000} ms)", Game.Settings.Debug.LongTickThreshold ); Game.viewport.Tick(); while (frameEndActions.Count != 0) frameEndActions.Dequeue()(this);