例如
foo() //Some operation bound by an external resource. db,I/O, whatever.
对比。
var watch = new Stopwatch();
watch.Start();
foo()
var time = watch.ElapsedMilliseconds
watch.Stop();