KDK_RTI_GET_UPTIME(3) Library Functions Manual KDK_RTI_GET_UPTIME(3) NAME kdk_rti_get_uptime - SYNOPSIS #include extern int kdk_rti_get_uptime(unsigned int *day, unsigned int *hour, unsigned int *min, unsigned int *sec); Link with -lkyrtinfo. Detailed Description The main function of the interface is to obtain the operating system boot time. The argument day is the number of days. The argument hour is the number of hours. The argument min is the number of minutes. The argument sec is the number of seconds. RETURN VALUE On success, return 0. On error, return -1. EXAMPLES #include "libkyrtinfo.h" #include int main() { printf("%lu KiB0, kdk_rti_get_mem_res_total_KiB()); printf("%lu KiB%f0, kdk_rti_get_mem_res_usage_KiB(), kdk_rti_get_mem_res_usage_percent()); printf("%lu KiB0, kdk_rti_get_mem_res_free_KiB()); printf("%lu KiB0, kdk_rti_get_mem_res_available_KiB()); printf("%lu KiB0, kdk_rti_get_mem_virt_alloc_KiB()); printf("%lu KiB0, kdk_rti_get_mem_swap_total_KiB()); printf("%lu KiB, %f0, kdk_rti_get_mem_swap_usage_KiB(), kdk_rti_get_mem_swap_usage_percent()); printf("%lu KiB0, kdk_rti_get_mem_swap_free_KiB()); printf("CPU%f0, kdk_rti_get_cpu_current_usage()); unsigned int day, hour, min, sec; kdk_rti_get_uptime(&day, &hour, &min, &sec); printf("%u%u%u%u0, day, hour, min, sec); return 0; } CONFORMING TO These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_rti_get_mem_res_total_KiB(), kdk_rti_get_mem_res_usage_percent(), kdk_rti_get_mem_res_usage_KiB(), kdk_rti_get_mem_res_available_KiB(), kdk_rti_get_mem_res_free_KiB(), kdk_rti_get_mem_virt_alloc_KiB(), kdk_rti_get_mem_swap_total_KiB(), kdk_rti_get_mem_swap_usage_percent(), kdk_rti_get_mem_swap_usage_KiB(), kdk_rti_get_mem_swap_free_KiB() and kdk_rti_get_cpu_current_usage(). SEE ALSO kdk_rti_get_mem_res_total_KiB(3), kdk_rti_get_mem_res_usage_percent(3), kdk_rti_get_mem_res_usage_KiB(3), kdk_rti_get_mem_res_available_KiB(3), kdk_rti_get_mem_res_free_KiB(3), kdk_rti_get_mem_virt_alloc_KiB(), kdk_rti_get_mem_swap_total_KiB(3), kdk_rti_get_mem_swap_usage_percent(3), kdk_rti_get_mem_swap_usage_KiB(3), kdk_rti_get_mem_swap_free_KiB(3) and kdk_rti_get_cpu_current_usage(3). Linux Programmer's Manual Mon Sep 18 2023 KDK_RTI_GET_UPTIME(3)