Mono.CSharp.InteractiveBase.Time C# (CSharp) Method

Time() public static method

Times the execution of the given delegate
public static Time ( System.Action a ) : System.TimeSpan
a System.Action
return System.TimeSpan
        public static TimeSpan Time(Action a)
        {
            DateTime start = DateTime.Now;
            a ();
            return DateTime.Now - start;
        }