Improved cpu percent calculator