diff options
author | Josh <eeei3.joshua0307lol@gmail.com> | 2025-01-16 17:37:48 -0500 |
---|---|---|
committer | Josh <eeei3.joshua0307lol@gmail.com> | 2025-01-16 17:37:48 -0500 |
commit | a0c0359009fbdf64925666299000e6dc0b3a1282 (patch) | |
tree | 4f54dc0b822246ee3576fbbfb9191441b3af57b2 |
feat: Created main.c and created barebones skeleton
-rw-r--r-- | main.c | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -0,0 +1,37 @@ +#include<stdio.h> +#include<string.h> +#include<sys/resource.h> +#include<sys/utsname.h> +#include<sys/sysinfo.h> +#include<sys/types.h> +#include<unistd.h> + +#define CPUINFO "/proc/cpuinfo"; +#define CPUFREQ "/sys/devices/system/cpu/cpu0/cpufreq/"; +#define CLEAR "\033[2J"; +#define REPOS "\033[H"; // Re-positions the cursor to top left of screen + +void move(int row, int col) { + printf("\x1b[%d;%df", row, col); +} + +int main(int argc, char** argv) { + short memory = 0; + short cpu = 0; + short cores = 0; + int samples = 20; + long tdelay = 500000; + for (int i = 1; i < argc ; i++) { + if (strstr(*argv, "--memory")) + memory = 1; + if (strstr(*argv, "--cpu")) + cpu = 1; + if (strstr(*argv, "--cores")) + cores = 1; + if (strstr(argv[i], "--samples=")) + ; + if (strstr(argv[i], "--tdelay=")) + ; + } + return 0; +} |