about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2022-10-24 20:16:31 -0400
committerelioat <elioat@tilde.institute>2022-10-24 20:16:31 -0400
commiteac2bd0f60767a567d50f11e5e96226719acf856 (patch)
treecd4890926ee8a7ac75e3439266d8397f1e40bc4c
parentafe826655ae81664afdfcbf76eea1933b0e5757a (diff)
downloadtour-eac2bd0f60767a567d50f11e5e96226719acf856.tar.gz
*
-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;
+}
+