Mercurial > silverbladetech
comparison MetroWpf/Stocks.Common/Core/TimedDelegates.cs @ 20:6109bc268b90
Latest
author | adminsh@apollo |
---|---|
date | Tue, 20 Mar 2012 13:37:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
19:09d18d6e5f40 | 20:6109bc268b90 |
---|---|
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 } |