Mercurial > silverbladetech
annotate MetroWpf/Stocks.Common/Core/TimedDelegates.cs @ 120:48c389520e5d
initial commit
author | stevenh7776 |
---|---|
date | Thu, 31 May 2012 14:12:43 +0100 |
parents | 6109bc268b90 |
children |
rev | line source |
---|---|
20 | 1 using System; |
2 using System.Diagnostics; | |
3 | |
4 namespace Stocks.Common.Core | |
5 { | |
6 public class TimedDelegates | |
7 { | |
8 public static T Execute<T>( | |
9 Func<T, T> func, | |
10 T paramIn, | |
11 out Stopwatch stopwatch) | |
12 { | |
13 stopwatch = new Stopwatch(); | |
14 stopwatch.Start(); | |
15 T result = func(paramIn); | |
16 stopwatch.Stop(); | |
17 return result; | |
18 } | |
19 } | |
20 } |