meilleur organisation code structures et variables

This commit is contained in:
Hugo LAMY
2022-01-22 19:16:23 +01:00
parent 3ba76ccc4e
commit cb615cb6b3
7 changed files with 173 additions and 28 deletions

View File

@@ -4,11 +4,11 @@ void init_time(t_philo *philo)
{
struct timeval stime;
if (philo->params->t_start_s == 0)
if (philo->global->t_start_s == 0)
{
gettimeofday(&stime, NULL);
philo->params->t_start_s = stime.tv_sec;
philo->params->t_start_u = stime.tv_usec;
philo->global->t_start_s = stime.tv_sec;
philo->global->t_start_u = stime.tv_usec;
}
}