fix: Fixed get_milliseconds() calculation

This commit is contained in:
Theo Champion 2025-07-31 14:45:31 +02:00
parent 008a1f9dc8
commit 59b79701d6

View file

@ -6,7 +6,7 @@
/* By: tchampio <tchampio@student.42lehavre. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/31 13:51:49 by tchampio #+# #+# */
/* Updated: 2025/07/31 14:12:48 by tchampio ### ########.fr */
/* Updated: 2025/07/31 14:40:48 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
@ -19,5 +19,5 @@ int get_milliseconds(void)
struct timeval tv;
gettimeofday(&tv, NULL);
return (tv.tv_usec / 1000);
return (tv.tv_sec * 1000000 + tv.tv_usec);
}