From 632b7d81d6c7943e5e39812068c77df4681ebed2 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Thu, 31 Dec 2020 19:22:37 +0100 Subject: Added usleep in death checking threads --- philo_two/src/routine.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'philo_two') diff --git a/philo_two/src/routine.c b/philo_two/src/routine.c index fd31ca2..29f2e23 100644 --- a/philo_two/src/routine.c +++ b/philo_two/src/routine.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 23:00:07 by cacharle #+# #+# */ -/* Updated: 2020/10/05 16:03:38 by cacharle ### ########.fr */ +/* Updated: 2020/12/31 19:16:32 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -42,7 +42,10 @@ void *routine_death(t_philo *arg) current = h_time_now(); while (arg->conf->all_alive && current - arg->time_last_eat < arg->conf->timeout_death) + { current = h_time_now(); + usleep(200); + } event_die(arg); return (NULL); } -- cgit