Created
January 7, 2019 15:17
-
-
Save Split82/fc4d1226b81edd4f9740e377e70c5061 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class EventCallPerformanceTest : MonoBehaviour { | |
private System.Diagnostics.Stopwatch _stopwatch; | |
void Start () { | |
_stopwatch = new System.Diagnostics.Stopwatch(); | |
_stopwatch.Restart(); | |
Debug.Log(_stopwatch.Elapsed.TotalMilliseconds); | |
_stopwatch.Stop(); | |
_stopwatch.Restart(); | |
Debug.Log(_stopwatch.Elapsed.TotalMilliseconds); | |
_stopwatch.Stop(); | |
_stopwatch.Restart(); | |
EmptyMethod(); | |
Debug.Log(_stopwatch.Elapsed.TotalMilliseconds); | |
_stopwatch.Stop(); | |
_stopwatch.Restart(); | |
EmptyMethod(); | |
Debug.Log(_stopwatch.Elapsed.TotalMilliseconds); | |
_stopwatch.Stop(); | |
_stopwatch.Restart(); | |
EmptyMethod(); | |
Debug.Log(_stopwatch.Elapsed.TotalMilliseconds); | |
_stopwatch.Stop(); | |
} | |
private void EmptyMethod() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment