Beispiel #1
0
 public static void PrintInfo(this IClock clock, TextWriter textWriter)
 {
     textWriter.WriteLine($"{clock.GetType().Name}");
     textWriter.WriteLine($"  Frequency = {clock.Frequency}");
     textWriter.WriteLine($"  Resolution = {clock.GetResolution().Nanoseconds} ns");
     textWriter.WriteLine($"  Availability = {(clock.IsAvailable ? "Available" : "Not available")}");
 }
Beispiel #2
0
 public static void PrintInfo(this IClock clock)
 {
     Console.WriteLine($"{clock.GetType().Name}");
     Console.WriteLine($"  Frequency = {clock.Frequency}");
     Console.WriteLine($"  Resolution = {clock.GetResolution(TimeUnit.Nanoseconds)} ns");
     Console.WriteLine($"  Availability = {(clock.IsAvailable ? "Available" : "Not available")}");
 }
Beispiel #3
0
 public static TimeInterval GetResolution() => BestClock.GetResolution();
 public static double GetResolution(TimeUnit timeUnit = null) => BestClock.GetResolution(timeUnit);