Minor changes

This commit is contained in:
Loïc Guégan 2024-02-02 13:39:57 +01:00
parent cab15f605e
commit 9ba1763b4f
3 changed files with 15 additions and 12 deletions

View file

@ -33,17 +33,6 @@ void sighandler(int signo) {
void *publisher(void *zmq_publisher);
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");
}
}
typedef struct queue {
int size;
char issending;

View file

@ -1,4 +1,6 @@
#include "utils.h"
#include <stdio.h>
#include <unistd.h>
void mkdirp(char *path){
char buffer[255]="mkdir -p ";
@ -14,4 +16,15 @@ unsigned char dir_exists(char *path){
return 1;
}
return 0;
}
}
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");
}
}

View file

@ -40,3 +40,4 @@
void mkdirp(char *path);
unsigned char dir_exists(char *path);
void askforbreak(char *break_file);