diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/common.c | 9 | ||||
| -rw-r--r-- | common/helper.c | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/common/common.c b/common/common.c index 381256b..face0b5 100644 --- a/common/common.c +++ b/common/common.c @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 23:12:55 by cacharle #+# #+# */ -/* Updated: 2020/02/14 19:42:18 by cacharle ### ########.fr */ +/* Updated: 2020/02/15 00:54:03 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,12 +33,7 @@ t_bool parse_args(t_philo_args *philo_args, int argc, char **argv) void philo_put_state_change(int id, t_philo_event event) // not correct for philo3 { - struct timeval tv; - - if (gettimeofday(&tv, NULL) == -1) - return ; - h_putnbr(tv.tv_sec); - h_putnbr(tv.tv_usec / 1000); + h_putnbr(h_time_now()); h_putchar(' '); h_putnbr(id); if (event == EVENT_FORK) diff --git a/common/helper.c b/common/helper.c index 2826ceb..7799a0c 100644 --- a/common/helper.c +++ b/common/helper.c @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 23:22:49 by cacharle #+# #+# */ -/* Updated: 2020/02/14 21:07:54 by cacharle ### ########.fr */ +/* Updated: 2020/02/15 00:53:47 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ |
