Browse Source

fix initial eat_time

master
narnaud 3 years ago
parent
commit
5ce01d6631
  1. 4
      philo/philo_init.c

4
philo/philo_init.c

@ -6,7 +6,7 @@
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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)

Loading…
Cancel
Save