blob: df382d8563b7f26912a1750a6409ca9b0c53fa7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <common.hpp>
#include <cstdarg>
#include <cstdio>
#include <chrono>
unsigned int millis(void) {
using namespace std::chrono;
auto now = system_clock::now();
return duration_cast<milliseconds>(now.time_since_epoch()).count();
}
void DEBUG_prints(const char* file, int line, const char *s,...)
{
va_list args;
printf("%s:%d: ", file, line);
va_start(args, s);
vprintf(s, args);
va_end(args);
}
|