#My utility classes and methods

1 messages · Page 1 of 1 (latest)

urban mica
#

Hello, just wanted to share this.

    public static void DebugTime(this long stamp) {
        Debug.Log($"Execution took {(Stopwatch.GetTimestamp() - stamp) * 1000.0 / Stopwatch.Frequency} ms");
    }```
It is a short function that can help you qucikly figure out how long the execution of your methods take
Example usage:
```cs
public void Update() {
    long stamp = System.Diagnostics.Stopwatch.GetTimestamp();
    // some code
    stamp.DebugTime();

That's all!

urban mica
#

My utility classes and methods