-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.h
More file actions
23 lines (18 loc) · 836 Bytes
/
util.h
File metadata and controls
23 lines (18 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef __SCHEME_IOMICROBENCH__
#define __SCHEME_IOMICROBENCH__
#include <stdio.h>
#include <time.h>
#define BLOCK_SIZE 512
#define PRNG_BUFSZ 64
#define TS2SEC(ts) (((double) (ts).tv_sec) + ((double) (ts).tv_nsec * 1e-09))
#define TIMEINTERVAL_SEC(sts, fts) \
((fts.tv_sec - sts.tv_sec) + (fts.tv_nsec - sts.tv_nsec) * 1e-09)
#define CLOCK_GETTIME(ts_ptr) \
{ \
if (clock_gettime(CLOCK_REALTIME, ts_ptr) != 0) { \
perror("clock_gettime(3) failed "); \
fprintf(stderr, " @%s:%d\n", __FILE__, __LINE__); \
} \
}
long procsuffix(char *);
#endif // __SCHEME_IOMICROBENCH__