| Libgtop Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <glibtop/uptime.h> #define GLIBTOP_UPTIME_UPTIME #define GLIBTOP_UPTIME_IDLETIME #define GLIBTOP_UPTIME_BOOT_TIME #define GLIBTOP_MAX_UPTIME glibtop_uptime;void glibtop_get_uptime (glibtop_uptime *buf); #define glibtop_get_uptime_rvoid glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf);void glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf);void glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf);
typedef struct {
guint64 flags;
double uptime; /* GLIBTOP_UPTIME_UPTIME */
double idletime; /* GLIBTOP_UPTIME_IDLETIME */
guint64 boot_time;
} glibtop_uptime;
void glibtop_get_uptime (glibtop_uptime *buf);
When porting LibGTop to a new system, you only need to implement
sysdeps/freebsd/uptime.c for an
example on how to obtain them using function(glibtop_cpu).
|
A location to return the system uptime |
void glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf);
|
|
|
void glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf);
|
|
|
void glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf);
|
|
|