# `Sys.Linux.Proc.Stat.CpuTimes`
[🔗](https://github.com/harmont-dev/hyper/blob/main/lib/sys/linux/proc/stat.ex#L17)

Cumulative jiffies a CPU (the aggregate, or one core) has spent in each state
since boot: `user nice system idle iowait irq softirq steal guest guest_nice`.

The trailing fields were added across kernel versions (`iowait`/`irq`/`softirq`
in 2.6, `steal` in 2.6.11, `guest` in 2.6.24, `guest_nice` in 2.6.33); any
column absent on an older kernel defaults to `0`.

# `t`

```elixir
@type t() :: %Sys.Linux.Proc.Stat.CpuTimes{
  guest: non_neg_integer(),
  guest_nice: non_neg_integer(),
  idle: non_neg_integer(),
  iowait: non_neg_integer(),
  irq: non_neg_integer(),
  nice: non_neg_integer(),
  softirq: non_neg_integer(),
  steal: non_neg_integer(),
  system: non_neg_integer(),
  user: non_neg_integer()
}
```

# `from_columns`

```elixir
@spec from_columns([non_neg_integer()]) :: t()
```

Build from the integer columns of a `cpu`/`cpuN` line. Missing trailing
columns default to `0`; any beyond `guest_nice` are ignored.

# `idle`

```elixir
@spec idle(t()) :: non_neg_integer() | float()
```

Jiffies spent not doing work: `idle + iowait`.

# `total`

```elixir
@spec total(t()) :: non_neg_integer() | float()
```

Total jiffies across every state - the denominator of a utilization ratio.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
