1
2
3
13
14
15
16
17
18
19
20
23
/* ... */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "time_support.h"
/* ... */
int64_t timeval_ms(void)
{
struct timeval now;
int retval = gettimeofday(&now, NULL);
if (retval < 0)
return retval;
return (int64_t)now.tv_sec * 1000 + now.tv_usec / 1000;
}{ ... }