[Mono-dev] high precision real & cpu time in MONO (on linux)
Paolo Molaro
lupus at ximian.com
Tue Feb 3 10:46:29 EST 2009
On 01/31/09 Basile Starynkevitch wrote:
> Apparently mono has some way to get it, since mono-2.2 contains the file
> mono/utils/mono-time.[ch] with functions
> gint64 mono_100ns_ticks(void) MONO_INTERNAL;
> gint64 mono_100ns_datetime (void) MONO_INTERNAL;
> I blindly guess that MONO_INTERNAL would mean that these functions are not
> accessible from C# 3.0 code.
You should use the StopWatch class (the implementation internally will
use mono_100ns_ticks) for monotonic time and DateTime if you want
the time (equivalent of calling gettimeofday() in C).
If you need more control than that, you can p/invoke clock_gettime(),
though you'll lose somewhat in portability.
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list