Click here to Skip to main content
15,889,909 members
Home / Discussions / C#
   

C#

 
GeneralRe: Output Type of Class library can not be started directly Pin
LiamD13-Apr-05 23:58
LiamD13-Apr-05 23:58 
GeneralRe: Output Type of Class library can not be started directly Pin
turbochimp14-Apr-05 2:34
turbochimp14-Apr-05 2:34 
GeneralPopmenu Pin
cishi_us13-Apr-05 5:39
cishi_us13-Apr-05 5:39 
GeneralRe: Popmenu Pin
Ashok Dhamija13-Apr-05 21:38
Ashok Dhamija13-Apr-05 21:38 
GeneralMultifile Assembly Hellllllp Pin
abohassan13-Apr-05 5:33
abohassan13-Apr-05 5:33 
GeneralRe: Multifile Assembly Hellllllp Pin
turbochimp13-Apr-05 5:45
turbochimp13-Apr-05 5:45 
GeneralProcess tree CPU Usage (WMI) Pin
Strangely13-Apr-05 4:40
Strangely13-Apr-05 4:40 
GeneralRe: Process tree CPU Usage (WMI) Pin
Strangely13-Apr-05 10:38
Strangely13-Apr-05 10:38 
If anyone's interested, I found the problem. Two stupid mistakes.

First:
<br />
UInt64 iKernelModeTime = UInt64.Parse(oReturn["KernelModeTime"].ToString()) / 1000;<br />


should be:
<br />
UInt64 iKernelModeTime = UInt64.Parse(oReturn["KernelModeTime"].ToString()) / 10000;<br />


ie, missed a zero in the divide.

Second:
<br />
float fPercent = (float)(iDiff) / (float)tsDiff.Milliseconds;<br />


shoud be:

<br />
float fPercent = (float)(iDiff) / (float)tsDiff.TotalMilliseconds;<br />


otherwise we divide by the remainder, not the total number of elapsed milliseconds.

With these changes it works quite well. Hope it's useful to someone.

Michael Stone
GeneralRe: Process tree CPU Usage (WMI) Pin
leppie13-Apr-05 19:08
leppie13-Apr-05 19:08 
GeneralSimple DB2 question Pin
trk_wakil13-Apr-05 4:16
trk_wakil13-Apr-05 4:16 
GeneralRe: Simple DB2 question Pin
Vasudevan Deepak Kumar13-Apr-05 4:38
Vasudevan Deepak Kumar13-Apr-05 4:38 
GeneralRe: Simple DB2 question Pin
trk_wakil13-Apr-05 7:01
trk_wakil13-Apr-05 7:01 
GeneralRe: Simple DB2 question Pin
Vasudevan Deepak Kumar13-Apr-05 19:30
Vasudevan Deepak Kumar13-Apr-05 19:30 
GeneralRe: Simple DB2 question Pin
trk_wakil14-Apr-05 4:48
trk_wakil14-Apr-05 4:48 
GeneralAsymmetric encryption in config files Pin
Esmo200013-Apr-05 4:11
Esmo200013-Apr-05 4:11 
GeneralRe: Asymmetric encryption in config files Pin
turbochimp13-Apr-05 5:42
turbochimp13-Apr-05 5:42 
GeneralRe: Asymmetric encryption in config files Pin
Esmo200013-Apr-05 5:49
Esmo200013-Apr-05 5:49 
GeneralRe: Asymmetric encryption in config files Pin
turbochimp13-Apr-05 6:45
turbochimp13-Apr-05 6:45 
GeneralRe: Asymmetric encryption in config files Pin
Esmo200013-Apr-05 9:59
Esmo200013-Apr-05 9:59 
GeneralRe: Asymmetric encryption in config files Pin
turbochimp13-Apr-05 10:54
turbochimp13-Apr-05 10:54 
GeneralRe: Asymmetric encryption in config files Pin
Ashok Dhamija13-Apr-05 22:00
Ashok Dhamija13-Apr-05 22:00 
GeneralLimit the transfer speed of file copyies Pin
Andemann13-Apr-05 3:00
Andemann13-Apr-05 3:00 
GeneralRe: Limit the transfer speed of file copyies Pin
Dave Kreskowiak13-Apr-05 4:14
mveDave Kreskowiak13-Apr-05 4:14 
GeneralInheriting ProxyAttribute Pin
Zgaddo13-Apr-05 2:56
Zgaddo13-Apr-05 2:56 
GeneralRe: Inheriting ProxyAttribute Pin
leppie13-Apr-05 3:02
leppie13-Apr-05 3:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.