2019-12-09 17:25:54 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
|
|
namespace Swan.Diagnostics {
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides access to a high-resolution, time measuring device.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <seealso cref="Stopwatch" />
|
2019-12-10 20:01:19 +01:00
|
|
|
|
// [Obsolete("NEED", false)]
|
2019-12-09 17:25:54 +01:00
|
|
|
|
public class HighResolutionTimer : Stopwatch {
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="HighResolutionTimer"/> class.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <exception cref="NotSupportedException">High-resolution timer not available.</exception>
|
|
|
|
|
public HighResolutionTimer() {
|
|
|
|
|
if(!IsHighResolution) {
|
|
|
|
|
throw new NotSupportedException("High-resolution timer not available");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-10 20:01:19 +01:00
|
|
|
|
/*/// <summary>
|
2019-12-10 20:20:45 +01:00
|
|
|
|
/// Gets the number of microseconds per timer tick.
|
2019-12-09 17:25:54 +01:00
|
|
|
|
/// </summary>
|
2019-12-10 20:20:45 +01:00
|
|
|
|
public static Double MicrosecondsPerTick { get; } = 1000000d / Frequency;*/
|
2019-12-09 17:25:54 +01:00
|
|
|
|
}
|
|
|
|
|
}
|