Hmm...I am not getting that, what platform are you using?

UserProcessTime is only supported on the following platforms:
Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home 
Edition, Windows XP Professional, Windows .NET Server family

Are you using the System.Diagnostics namespace?

-----Original Message-----
From: Mattias Konradsson [mailto:[EMAIL PROTECTED]]
Sent: 13 April 2002 08:33
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Measuring performance


>From: "Donal Devine" <[EMAIL PROTECTED]>
>TimeSpan tsStart;
>TimeSpan tsDuration;
>GC.Collect();
>GC.WaitForPendingFinalizers();
>tsStart = Process.GetCurrentProcess().Threads[0].UserProcessorTime;
>//Do stuff
>tsDuration =
Process.GetCurrentProcess().Threads[0].UserProcessorTime.Subtract(tsStart);


This seems like a good solution but I keep getting Access Denied when I try
to access UserProcessTime, both from a component or aspx page, any ideas?

Best Regards
----
Mattias Konradsson
"Reinventing the wheel since 1977"

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to