diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-02-15 01:47:26 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-02-15 01:47:26 +0100 |
| commit | 2c5abe421b7a1b92081e38f6b1f04d407fcba834 (patch) | |
| tree | c7e7aa9db3a3b84bd80bc8a5a713d5bfeb6a66f7 /common/common.c | |
| parent | 6a1e91750ee43fccb6160af0f44139698c8dfdc3 (diff) | |
| download | philosophers-2c5abe421b7a1b92081e38f6b1f04d407fcba834.tar.gz philosophers-2c5abe421b7a1b92081e38f6b1f04d407fcba834.tar.bz2 philosophers-2c5abe421b7a1b92081e38f6b1f04d407fcba834.zip | |
philo_one small refactoring, philo_three draft
Diffstat (limited to 'common/common.c')
| -rw-r--r-- | common/common.c | 9 |
1 files changed, 2 insertions, 7 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) |
