If you ever need to do a have little performance overview in your application. See Code Example below…
Static Class (you have to add a “using System.Diagnostics;”)
public class StopWatcher { static Stopwatch sw = new Stopwatch(); public static void start() { if (sw.IsRunning) { sw.Stop(); sw.Reset(); } sw.Start(); } public static long elapsed() { return sw.ElapsedMilliseconds; } }
Now you can use the code everywhere in your application
Debug.WriteLine("Own Permission: " + StopWatcher.elapsed());
Of course it would make sense and I think it would be easy to integrate this with Postsharp!
A basic overview about using the Stopwatch Class can be found here:
How to measure time in simple way using Stopwatch | C# Developing.net.






![canal de midi, France - tree reflection in the canal [Explore #7] canal de midi, France - tree reflection in the canal [Explore #7]](http://static.flickr.com/2838/9076284813_c6c5a83a80_t.jpg)


