Sometimes the call will fail. There's nothing that can be done about it but in my experience it's pretty rare. If you are calling SystemCPULoad numerous times throughout the run time of your program, most of the calls should return correct values.
Sometimes the call will fail. There's nothing that can be done about it but in my experience it's pretty rare. If you are calling SystemCPULoad numerous times throughout the run time of your program, most of the calls should return correct values.
And it reports -100 every time? That's very strange. It works perfectly on my Windows 7 machines (32 and 64 bit) and RasPi2. What Java version are you using?
Just to be clear, you're declaring the AWTRobot as a Global variable once and then calling SystemCPULoad inside your Timer_Tick event, right? You're not declaring a new AWTRobot each time inside Timer_Tick, right?