about summary refs log tree commit diff stats
path: root/c/pomo.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/pomo.c')
-rw-r--r--c/pomo.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/c/pomo.c b/c/pomo.c
new file mode 100644
index 0000000..6655f2d
--- /dev/null
+++ b/c/pomo.c
@@ -0,0 +1,57 @@
+#include <stdio.h>
+#include <unistd.h>
+
+// int pomo_time      = 1500;
+// int pomo_rest      =  600;
+
+int pomo_time = 5;
+int pomo_rest = 3;
+
+int pomo_long_rest =  900;
+int pomo_count     =    0;
+
+int is_break = 0;
+
+int pomo (int p_time, int p_rest, int p_count, int break_status)
+{
+	if (!break_status)
+	{
+		if (p_time > 0 && p_count < 4)
+		{
+			printf("pomo: %d\n", p_time);
+			sleep(1);
+			p_time--;
+		}
+		break_status = 1;
+	}
+	return 0;
+}
+
+int main (int argc, const char * argv[])
+{
+
+	pomo(pomo_time, pomo_rest, pomo_count, is_break);
+
+	// if (!is_break) {
+	// 	while (pomo_time > 0 && pomo_count < 4) {
+	// 		printf("pomo: %d\n ", pomo_time);
+	// 		sleep(1);
+	// 		pomo_time--;
+	// 	}
+	// 	is_break = 1;
+	// 	printf("END POMO!\n");
+	// };
+
+	// if (is_break) {
+	// 	while (pomo_rest > 0 && pomo_count < 4) {
+	// 		printf("rest: %d\n ", pomo_rest);
+	// 		sleep(1);
+	// 		pomo_rest--;
+	// 	}
+	// 	is_break = 0;
+	// 	printf("END REST!\n");
+	// };
+
+  return 0;
+}
+