timer_test.c revision 5f74ac33a07148f2f28b26870c5beccb778b4bd3
#include "attribute.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <isc/memcluster.h>
int tick_count = 0;
static isc_boolean_t
return (ISC_TRUE);
}
static isc_boolean_t
{
tick_count++;
if (tick_count % 3 == 0)
if (tick_count == 7) {
(void)os_time_get(&now);
expires.nanoseconds = 0;
interval.nanoseconds = 0;
printf("*** resetting ti3 ***\n");
== ISC_R_SUCCESS);
}
return (ISC_FALSE);
}
static isc_boolean_t
{
char *type;
type = "idle";
else
type = "life";
printf("*** saving task 3 ***\n");
return (ISC_FALSE);
}
return (ISC_TRUE);
}
void
unsigned int workers;
if (argc > 1)
else
workers = 2;
(void)os_time_get(&now);
expires.nanoseconds = 0;
interval.nanoseconds = 0;
expires.nanoseconds = 0;
interval.nanoseconds = 0;
expires.nanoseconds = 0;
interval.nanoseconds = 0;
task_detach(&t1);
task_detach(&t2);
task_detach(&t3);
sleep(15);
printf("destroy\n");
sleep(2);
printf("destroyed\n");
}