I would like to programmatically measure momentary CPU load on Windows XP.
1. Does anyone have a snippet of code that will achieve this?
2. In particular, I would like to do this from within the VideoLan open source code. How can I achieve this in the Cygwin environment which is typically used to compile the VideoLan package for Windows in a Windows development environment?