Matthos Denys 5f1937beec update
2021-05-18 21:36:56 +03:00

15 lines
316 B
C

#include "../includes/philo_header.h"
void messages(t_all *all, t_philo *philo, char *str)
{
time_t timestemp;
timestemp = ft_get_time() - all->start_time;
if (philo->all_struct->smert != 42)
{
sem_wait(all->write);
printf("%ld %d %s\n", timestemp, philo->nbr_philo + 1, str);
sem_post(all->write);
}
}