diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-12-31 19:22:37 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-12-31 19:22:37 +0100 |
| commit | 632b7d81d6c7943e5e39812068c77df4681ebed2 (patch) | |
| tree | d434bbed8f0fb1f8cd04aa0dc5e6dc7fc9701520 /philo_three/src/child.c | |
| parent | cf2ef2c3901f3da524079a9ad912dfb99e115a7e (diff) | |
| download | philosophers-632b7d81d6c7943e5e39812068c77df4681ebed2.tar.gz philosophers-632b7d81d6c7943e5e39812068c77df4681ebed2.tar.bz2 philosophers-632b7d81d6c7943e5e39812068c77df4681ebed2.zip | |
Added usleep in death checking threads
Diffstat (limited to 'philo_three/src/child.c')
| -rw-r--r-- | philo_three/src/child.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/philo_three/src/child.c b/philo_three/src/child.c index 2e9b566..2b17960 100644 --- a/philo_three/src/child.c +++ b/philo_three/src/child.c @@ -6,7 +6,7 @@ /* By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/09/30 14:36:16 by cacharle #+# #+# */ -/* Updated: 2020/10/05 15:02:10 by cacharle ### ########.fr */ +/* Updated: 2020/12/31 19:12:12 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,7 +18,10 @@ void *routine_death(t_philo *philo) current = h_time_now(); while (current - philo->time_last_eat < philo->conf->timeout_death) + { current = h_time_now(); + usleep(200); + } event_die(philo); return (NULL); } |
