# Reading CPU information
```rust,no_run
# fn main() -> Result<(), Box<dyn std::error::Error>> {
use sinf::system::{CpuRefreshKind, RefreshKind, System};
let mut sys = System::new_with_specifics(
RefreshKind::nothing().with_cpu(CpuRefreshKind::everything()),
)?;
std::thread::sleep(sinf::system::MINIMUM_CPU_UPDATE_INTERVAL);
sys.refresh_cpu_usage();
for cpu in sys.cpus() {
println!("{}: {}% @ {} MHz", cpu.name(), cpu.usage(), cpu.frequency());
}
# Ok(())
# }
```
CPU usage is computed from the difference between two reads. Refreshing too
often produces `0` (or the maximum value on Linux); always wait at least
`MINIMUM_CPU_UPDATE_INTERVAL`.