[Mono-dev] high precision real & cpu time in MONO (on linux)
Basile Starynkevitch
basile at starynkevitch.net
Sat Jan 31 14:06:00 EST 2009
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 CLOCK_MONOTONIC
and CLOCK_THREAD_CPUTIME_ID.
But any way of measuring milliseconds real & cpu (preferably thread) time is
ok.
Any clues?
Thanks.
--
Basile Starynkevitch http://starynkevitch.net/Basile/
--
View this message in context: http://www.nabble.com/high-precision-real---cpu-time-in-MONO-%28on-linux%29-tp21767078p21767078.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list