aboutsummaryrefslogtreecommitdiff
path: root/tests/common/benchmark.h
blob: d3ed6ebc4c2a0b7a8b952ffedf2fd669e9cfac91 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef KMI_BENCHMARK_H
#define KMI_BENCHMARK_H

#include "sys.h"
#include "start.h"
#include "printf.h"

#define exit() sys_poweroff(SYS_SHUTDOWN)
#define report(start, end, timebase)\
	do {\
		printf("%lld / %lld\n", \
				(long long unsigned)((end) - (start)), \
				(long long unsigned)(timebase)); \
		exit();\
	} while (0)

#endif /* KMI_BENCHMARK_H */