From e874ad94a31a8259b8eb7ad2865767c081bcd279 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 3 Jan 2021 14:04:22 +0100 Subject: Fixing philo_one/philo_two dying by sleeping more when checking the death, Fixing timestamp in the wrong order in philo_three --- philo_one/src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'philo_one/src/main.c') diff --git a/philo_one/src/main.c b/philo_one/src/main.c index 0c406b0..55e70d3 100644 --- a/philo_one/src/main.c +++ b/philo_one/src/main.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/24 05:53:02 by cacharle #+# #+# */ -/* Updated: 2021/01/02 10:49:26 by cacharle ### ########.fr */ +/* Updated: 2021/01/03 13:57:04 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -54,6 +54,7 @@ int main(int argc, char **argv) return (0); if (st_setup(&conf, &philos, &forks) != 0) return (1); + conf.initial_time = h_time_now(); if (!philos_start(philos, conf.philo_num)) { forks_destroy(forks, conf.philo_num); -- cgit