changed framework to dotnet6
This commit is contained in:
18
Experimental/Tester.cs
Normal file
18
Experimental/Tester.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace DTLib.Experimental
|
||||
{
|
||||
public static class Tester
|
||||
{
|
||||
public static void LogOperationTime(string op_name, int repeats, Action operation)
|
||||
{
|
||||
Stopwatch clock = new();
|
||||
clock.Start();
|
||||
for (int i = 0; i < repeats; i++)
|
||||
operation();
|
||||
clock.Stop();
|
||||
PublicLog.LogNoTime("c",$"operation {op_name} took {clock.ElapsedTicks / repeats} ticks\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user