[Mono-list] Re: Time problems on Mono

Paolo Molaro lupus@ximian.com
Wed, 15 Dec 2004 15:08:05 +0100


On 12/15/04 Jordi wrote:
> --- Paolo  wrote:
> I use the following methods: 
>  DateTime and TimeSpan to calculate the execution time Console.WriteLine() to print it out.
> 
> 
> DateTime initial = DateTime.Now;
> ...
> TimeSpan total = DateTime.Now.Subtract( initial );
> Console.WriteLine(total.TotalMilliseconds.ToString() ); 

TimeSpan.TotalMilliseconds returns a double, so it's perfectly
fine that you got decimal digits printed, it depends on the 
actual value.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better