diff options
author | Miguel de Icaza <miguel@gnome.org> | 2008-09-05 01:35:46 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2008-09-05 01:35:46 +0400 |
commit | 30c650100544c532caf34f9fe34c246f23200c39 (patch) | |
tree | cec2f347b2f28e83c5ea1532ff748f234ff4382c /man/csharp.1 | |
parent | 3e17728b549725999afdc997706fc97296fe3a15 (diff) |
Add this one
svn path=/trunk/mono/; revision=112334
Diffstat (limited to 'man/csharp.1')
-rw-r--r-- | man/csharp.1 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/man/csharp.1 b/man/csharp.1 index bc28b03b1f4..00e1ce967c6 100644 --- a/man/csharp.1 +++ b/man/csharp.1 @@ -266,6 +266,24 @@ previous variable declarations, this is different than C# when compiled. .I void ShowUsing() Displays all the using statements in effect. +.I TimeSpan Time (Action a) +Handy routine to time the time that some code takes to execute. The +parameter is an Action delegate, and the return value is a TimeSpan. +For example: +.PP +.nf +csharp> Time (() => { for (int i = 0; i < 5; i++) Console.WriteLine (i);}); +0 +1 +2 +3 +4 +00:00:00.0043230 +csharp> +.fi +.PP +The return value is a TimeSpan, that you can store in a variable for +benchmarking purposes. .SH STARTUP FILES The C# shell will load all the C# script files and Mono assemblies located in the ~/.config/csharp directory on Unix. C# script files |