diff --git a/project/code/TMV/Timing.cs b/project/code/TMV/Timing.cs new file mode 100644 index 0000000..8143b14 --- /dev/null +++ b/project/code/TMV/Timing.cs @@ -0,0 +1,15 @@ +using System; +using System.Diagnostics; + +namespace KeepersCompound.TMV; + +public static class Timing +{ + public static void TimeStage(string stagename, Action action) + { + var watch = Stopwatch.StartNew(); + action(); + watch.Stop(); + Godot.GD.Print($"[{stagename}]: {watch.Elapsed:g}"); + } +} \ No newline at end of file