3msと出力される
using UnityEngine;
using System.Diagnostics;
public class Test : MonoBehaviour {
// Use this for initialization
void Start () {
Stopwatch sw = new Stopwatch ();
sw.Start ();
// 3秒待つ.
System.Threading.Thread.Sleep (3);
sw.Stop ();
UnityEngine.Debug.Log (sw.ElapsedMilliseconds+"ms");
}
}