mirror of
https://github.com/ish-app/ish.git
synced 2026-01-18 13:57:29 +00:00
23 lines
412 B
C
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
|