-
-
Save igorzi/1456149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct uv_cpu_info_s uv_cpu_info_t; | |
typedef struct uv_interface_address_s uv_interface_address_t; | |
struct uv_cpu_info_s { | |
char* brand; | |
int speed; | |
struct uv_cpu_times_s { | |
int user; | |
int nice; | |
int sys; | |
int idle; | |
int irq; | |
} cpu_times; | |
}; | |
struct uv_interface_address_s { | |
char* name; | |
int internal; | |
union { | |
struct sockaddr_in address; | |
struct sockaddr_in6 address6; | |
} | |
}; | |
char** uv_setup_args(int argc, char** argv); | |
uv_err_t uv_set_process_title(const char* title); | |
uv_err_t uv_get_process_title(char* buffer, size_t size); | |
uv_err_t uv_resident_set_memory(size_t* rss); | |
uv_err_t uv_uptime(bool adjusted, double* uptime); | |
/* | |
* This allocates cpu_infos array, and sets count. The array | |
* is freed using uv_free_cpu_info() | |
*/ | |
uv_err_t uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count); | |
void uv_free_cpu_info(uv_cpu_info_t* cpu_infos); | |
/* | |
* This allocates addresses array, and sets count. The array | |
* is freed using uv_free_interface_addresses() | |
*/ | |
uv_err_t uv_interface_addresses(uv_interface_address_t** addresses, int* count); | |
void uv_free_interface_addresses(uv_interface_address_t* addresses); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment