-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_time.c
21 lines (18 loc) · 1.01 KB
/
get_time.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_time.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ykoh <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/03/15 02:57:13 by ykoh #+# #+# */
/* Updated: 2021/03/15 02:57:14 by ykoh ### ########.fr */
/* */
/* ************************************************************************** */
#include <sys/time.h>
time_t get_time(void)
{
struct timeval tp;
gettimeofday(&tp, NULL);
return (tp.tv_sec * 1000 + tp.tv_usec / 1000);
}