[Mono-dev] high precision real & cpu time in MONO (on linux)
kumpera at gmail.com
Sun Feb 1 12:49:46 EST 2009
You can use P/Invoke to call those functions.
On Sat, Jan 31, 2009 at 5:06 PM, Basile Starynkevitch <
basile at starynkevitch.net> wrote:
> Hello All,
> I am a newbie to Mono and to C# ; I am using only Debian/Sid/AMD64 on a
> recent linux 2.6.29-rc3 kernel (with CONFIG_HIGH_RES_TIMERS CONFIG_HZ=1000)
> , mono 2.2
> I am searching for a way to measure real clock and cpu time with high
> precision. The linux system call is clock_gettime.
> 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.
> What is the easiest way to get high precision (at least high resolution)
> time on Linux? Ideally I would like to get CLOCK_REALTIME or
> and CLOCK_THREAD_CPUTIME_ID.
> But any way of measuring milliseconds real & cpu (preferably thread) time
> Any clues?
> Basile Starynkevitch http://starynkevitch.net/Basile/
> View this message in context:
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list