summaryrefslogtreecommitdiff
path: root/test/pktmr.c
blob: 5237415eaab4ea2231af6680b8bcb5dc5e26ae54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

#include "../pktmr.h"
#include "../pkmacros.h"

#include <stdint.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
	struct pk_tmr tmr = {0};
	uint64_t asdf;
	(void)asdf;
	(void)stdout;

	// timer
	{
		pk_tmr_start(tmr);
		pk_tmr_stop(tmr);
		PK_LOGV_INF("%s: elapsed time (nano): %li\n", __FILE__, pk_tmr_duration_nano(tmr));
		PK_LOGV_INF("%s: elapsed time (double): %.9f\n", __FILE__, pk_tmr_duration_double(tmr));
	}

	return 0;
}