Time - Time-interval Measurements
public class TimeHelper
{
private long _start, _stop, _elapsed;
/// <summary>
/// 获取初始时间戳
/// </summary>
public void start()
{
_start = Stopwatch.GetTimestamp();
}
/// <summary>
/// 获取终结时间戳
/// </summary>
public void stop()
{
_stop = Stopwatch.GetTimestamp();
}
/// <summary>
/// 获取高精度时间间隔
/// </summary>
/// <returns></returns>
public double getTimeInteval()
{
return (_stop - _start) * (1.0 / Stopwatch.Frequency);
}
}