1 /* $NetBSD: idtest.c,v 1.4 2003/12/10 05:22:18 itojun Exp $ */
3 /* If defined, abort at first short period and only test REGRESS times. */
4 #define REGRESS 10000000 /* should be enough... */
23 static randomid_t ctx
= NULL
;
28 memset(last
, 0, sizeof(last
));
29 ctx
= randomid_new(16, (long)3600);
32 while (n
< UINT64_MAX
) {
35 if (n
- last
[id
] <= lowest
) {
36 if (lowest
!= UINT64_MAX
) {
38 "last call for id at %9lld, "
39 "current call %9lld (diff %5lld)\n",
40 id
, last
[id
], n
, n
- last
[id
]);
42 if (n
- last
[id
] < PERIOD
) {
43 printf("diff (%"PRIu64
") less "
44 "than minimum period "
45 "(%d)\n", n
- last
[id
],
51 lowest
= n
- last
[id
];