ish/platform/platform.h
2019-01-05 19:00:03 -08:00

23 lines
412 B
C

#ifndef PLATFORM_H
#define PLATFORM_H
#include "misc.h"
// for some reason a tick is always 10ms
struct cpu_usage {
uint64_t user_ticks;
uint64_t system_ticks;
uint64_t idle_ticks;
uint64_t nice_ticks;
};
struct cpu_usage get_cpu_usage(void);
struct mem_usage {
uint64_t total;
uint64_t free;
uint64_t active;
uint64_t inactive;
};
struct mem_usage get_mem_usage(void);
#endif