2021-05-17 16:53:23 +03:00

14 lines
330 B
C

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