[Mono-dev] PerformanceCounter on OS X

Duane Wandless duane at wandless.net
Tue Feb 15 18:09:27 EST 2011

I've attempted to figure out how this is implemented on Leopard.  It appears
that get_cpu_times in mono/utils/mono-proclib.c relies on "/proc/stat".
 Which as far as I can tell does not exist on Snow Leopard.

The C# code is:

cpu = new PerformanceCounter("Process", "% Processor Time",


NextValue() is always 0.  But on Windows it does work as expected.

I may be misreading the code, I did not actually confirm this is the code
path taken.  Even if the code path is different NextValue is still always 0.

Any help would be appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20110215/8d18e83e/attachment.html 

More information about the Mono-devel-list mailing list