Removes get_clock_ticks

This function was only used in a single place. Didn't seem justified
to make it a separate function (yet).

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Moves declaration to the top.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Moves declaration to top.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
removes whitespace.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Renames SwapMem to SwapMemInfo to be consistent.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Fixes formatting style

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Changes signature for cpu_times.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Temporarily removed some functions
Fixes memory leak.
Improves variable initialisation and error handling.
Simplifies extracting physical devices.
Combines disk_partition functions

This commit combines the disk_partitions_phys and disk_partitions
functions into a single one with a parameter specifying whether we're
looking for physical or not.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Use a container structure for multiple cputimes.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Implements per CPU statistics.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Implements cpu_times_percent.
Fixes typo.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Casts return values of calloc.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Removes CpuTimesInfo. Simplifies API.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Implements cpu_times_percent.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
Implements cpu_percent