12-01-2009, 03:10 AM
Gintaras,
So I figured it would be nice to have an average...This is what I came up with:
Now how would you do this?
Thanks,
jimmy Vig
So I figured it would be nice to have an average...This is what I came up with:
,case WM_INITDIALOG
,GetCPU
,SetTimer hDlg 1 100 0
,case WM_TIMER
,sel wParam
,,case 1
,,ARRAY(int)+ Average
,,if Average.len>100
,,,Average.remove(0)
,,int i=GetCPU
,,Average[]=i
,,for _i 0 Average.len
,,,int CPU=CPU+Average[_i]
,,CPU=CPU/Average.len
,,SendMessage id(3 hDlg) PBM_SETPOS CPU 0
,,_s.from(i " %"); _s.setwintext(id(4 hDlg))Thanks,
jimmy Vig
