mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-13 15:04:35 +01:00
20 lines
420 B
C#
20 lines
420 B
C#
using System.Diagnostics;
|
|
using UnityEngine;
|
|
|
|
public static class HPProfile
|
|
{
|
|
private static Stopwatch stopWatch = new Stopwatch();
|
|
|
|
public static void Begin()
|
|
{
|
|
stopWatch.Reset();
|
|
stopWatch.Start();
|
|
}
|
|
|
|
public static void End(string prompt)
|
|
{
|
|
stopWatch.Stop();
|
|
UnityEngine.Debug.Log(string.Format("{0} : {1}", prompt, ((float)stopWatch.ElapsedTicks * 1000f / (float)Stopwatch.Frequency).ToString()));
|
|
}
|
|
}
|