From 5ce01d66311b27b7c655cf9492f82a032636f5ba Mon Sep 17 00:00:00 2001 From: narnaud Date: Thu, 19 May 2022 22:29:55 +0200 Subject: [PATCH] fix initial eat_time --- philo/philo_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/philo/philo_init.c b/philo/philo_init.c index 954d97b..01c6c55 100644 --- a/philo/philo_init.c +++ b/philo/philo_init.c @@ -6,7 +6,7 @@ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/11/24 15:44:04 by narnaud #+# #+# */ -/* Updated: 2022/05/19 20:07:29 by narnaud@stude ### ########.fr */ +/* Updated: 2022/05/19 22:24:51 by narnaud@stude ### ########.fr */ /* */ /* ************************************************************************** */ @@ -62,10 +62,10 @@ void invit_philos(t_philo *philos) t_philo *philo; philo = philos; - philo->eat_time = room_clock(); room = philo->room; while (i >= 0) { + philo->eat_time = room_clock(); pthread_create(philo->thd, NULL, philos_life, (void *)philo); pthread_detach(*philo->thd); if ((i % 2) == 0)