summaryrefslogtreecommitdiff
path: root/src/get_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/get_load.c')
-rw-r--r--src/get_load.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/get_load.c b/src/get_load.c
deleted file mode 100644
index 2f58d9b..0000000
--- a/src/get_load.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// vim:ts=8:expandtab
-#include "i3status.h"
-#include <err.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-const char *get_load() {
- static char part[512];
-
-/* Get load */
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(sun)
- double loadavg[3];
- if (getloadavg(loadavg, 3) == -1)
- errx(-1, "getloadavg() failed\n");
- (void)snprintf(part, sizeof(part), "%1.2f %1.2f %1.2f", loadavg[0], loadavg[1], loadavg[2]);
-#else
- part[0] = '\0';
-#endif
-
- return part;
-}