1
#if !SILVERLIGHT && !MONOTOUCH && !XBOX
4
using System.Diagnostics;
6
namespace ServiceStack.Common.Utils
8
public static class PerfUtils
10
public static TimeSpan ToTimeSpan(this long fromTicks)
12
return TimeSpan.FromSeconds(fromTicks * 1d / Stopwatch.Frequency);
15
public static long Measure(long iterations, Action action)
18
var begin = Stopwatch.GetTimestamp();
20
for (var i = 0; i < iterations; i++)
25
var end = Stopwatch.GetTimestamp();
b'\\ No newline at end of file'