From a0c0359009fbdf64925666299000e6dc0b3a1282 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 16 Jan 2025 17:37:48 -0500 Subject: feat: Created main.c and created barebones skeleton --- main.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 main.c diff --git a/main.c b/main.c new file mode 100644 index 0000000..f921ab8 --- /dev/null +++ b/main.c @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include +#include +#include + +#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; +} -- cgit v1.2.3