16 lines
268 B
C
16 lines
268 B
C
#include "utils.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/time.h>
|
|
|
|
void error(const char *msg) {
|
|
perror(msg);
|
|
exit(1);
|
|
}
|
|
|
|
double get_time_ms() {
|
|
struct timeval tv;
|
|
gettimeofday(&tv, NULL);
|
|
return (tv.tv_sec * 1000.0) + (tv.tv_usec / 1000.0);
|
|
}
|