13 lines
357 B
C
13 lines
357 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)
|
|
{
|
|
pthread_mutex_lock(&all->write);
|
|
printf("%ld %*s%d %s\n", timestemp, philo->nbr_philo * 30, "", philo->nbr_philo + 1, str);
|
|
pthread_mutex_unlock(&all->write);
|
|
}
|
|
}
|