[Mono-list] System.Diagnostics.StopWatch (does it work?)

russell.kay at realtimeworlds.com russell.kay at realtimeworlds.com
Wed Mar 28 07:08:04 EDT 2007


Ah!

Thanks that explains what I am seeing between Win32 and the Mac, thanks
I now trust my timing a bit better.

I was using the stopwatch ElapsedTicks property rather than getting the
Elapsed as a TimeSpan then using that (which is a nicer way to do it
anyway).

Out of interest is there any documentation on what the resolution of the
timers on different platforms are? Is there some Linux/Unix/Posix
standard timer that is used, that I can then look up for the platforms
that I'm working with?

Thanks

Russell

-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Atsushi Eno
Sent: 28 March 2007 11:26
To: mono-list at lists.ximian.com
Subject: Re: [Mono-list] System.Diagnostics.StopWatch (does it work?)

Hi,

Stopwatch resolution is fixed and high resolution mode is not supported.

I'm not sure what you meant "work" though. It works per 
TimeSpan.TicksPerSecond.

Atsushi Eno


russell.kay at realtimeworlds.com wrote:
> 
> 
> All,
> 
>  
> 
> I have been using the System.Diagnostics.Stopwatch to construct timing

> tests and I am a little suspect that it is not working across
platforms 
> on Win32 and Macs it reports the same frequency of 10,000,000 ticks
per 
> second and I suspect the timings that I am getting out of it?
> 
>  
> 
> I'll test on a Linux system as well to see what is going on...
> 
>  
> 
> But does anyone know if it should work cross platform on Mono? Or is
it 
> needing a bit of love and attention?
> 
>  
> 
> Russell
> 
> 
> DISCLAIMER
> This message and any attachments contain privileged and confidential 
> information intended for the use of the addressee named above. If you 
> are not the intended recipient of this message, you are hereby
notified 
> that any use, dissemination, distribution or reproduction of this 
> message is prohibited. Please note that we cannot guarantee that this 
> message or any attachment is virus free or that it has not been 
> intercepted and amended. The views of the author may not necessarily 
> reflect those of Real Time Worlds Ltd.
> ____________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

____________________________________________________________________
This email has been scanned by the MessageLabs Email Security System

DISCLAIMER
This message and any attachments contain privileged and confidential information intended for the use of the addressee named above. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. Please note that we cannot guarantee that this message or any attachment is virus free or that it has not been intercepted and amended. The views of the author may not necessarily reflect those of Real Time Worlds Ltd.
____________________________________________________________________
This email has been scanned by the MessageLabs Email Security System


More information about the Mono-list mailing list