From 9ba1763b4f1b4aa5e65fc45a0dc5eef620b1d4ee Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Fri, 2 Feb 2024 13:39:57 +0100 Subject: Minor changes --- src/utils.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 832cc9b..80149d5 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,6 @@ #include "utils.h" +#include +#include void mkdirp(char *path){ char buffer[255]="mkdir -p "; @@ -14,4 +16,15 @@ unsigned char dir_exists(char *path){ return 1; } return 0; -} \ No newline at end of file +} + +void askforbreak(char *break_file){ + FILE * file; + file = fopen(break_file, "r"); + while(file){ + printf("I am doing a break for %ds\n", BREAK_DURATION); + sleep(BREAK_DURATION); + fclose(file); + file = fopen(break_file, "r"); + } +} -- cgit v1.2.3