fix: I create now 1 thread by philo

This commit is contained in:
Camille Chauvet
2023-04-19 11:53:50 +00:00
parent a37cbf88f3
commit 4e27d103a8
6 changed files with 42 additions and 24 deletions

5
time.c
View File

@ -5,13 +5,10 @@
size_t get_time(void)
{
size_t timedefault = 0;
size_t time;
struct timeval tv;
gettimeofday(&tv, NULL);
time = tv.tv_sec * 1000000 + tv.tv_usec;
if (timedefault == 0)
timedefault = time;
return ((time - timedefault) / 1000);
return (time / 1000);
}