Hello Alberto, On CPU load: > I don't know of any DLL tha can do that, but I can > offer you the code I use in Winrad for that purpose. . . . > // prepare to support GetSystemTimes > hKernel = LoadLibrary( _T("Kernel32.dll") ); Looks like using a dll;-)
> res = GSTaddr(&idle, &kern, &usr); > res &= GetProcessTimes(GetCurrentProcess(), (FILETIME*)&crea, > (FILETIME*)&exit, (FILETIME*)&pkern, > (FILETIME*)&puser); On my old laptop this works fine:-) It is a Pentium 4. On the new one the code does not give the correct result:-( The new one has a dual core centrino and the result I get is 50% of the load indicated by the system monitor. I find it a bit peculiar that the elapsed time (kern+usr) runs four times faster than the system clock.... One solution could be to compare the system clock with kern+user or use sqrt((kern+user)*system_clock) as the reference time to which pkern+puser is related. In case the problem is a bug in Kernel32.dll Microsoft might correct it and then a fix inside Linrad would become incorrect. Is there a way to find out how many cores there are in the system? Then I could use the system clock times the number of cores to get the amount of total CPU time available. The computer is only a few months old and I have made all the updates that were available at Microsoft Update. Any idea? 73 Leif / SM5BSZ ############################################################# This message is sent to you because you are subscribed to the mailing list <linrad@antennspecialisten.se>. To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>