Mercurial > silverbladetech
annotate MetroWpf/Stocks.Common/Core/TimedDelegates.cs @ 90:d523381be45a
nuge restore added
author | stevenhollidge <stevenhollidge@hotmail.com> |
---|---|
date | Mon, 30 Apr 2012 10:48:49 +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 } |