timer_test.c revision b07f8da9cd892573d00c835a22b205764975c2d2
#include "attribute.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <isc/memcluster.h>
int tick_count = 0;
static boolean_t
return (TRUE);
}
static 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");
TRUE)
== ISC_R_SUCCESS);
}
return (FALSE);
}
static boolean_t
{
char *type;
type = "idle";
else
type = "life";
printf("*** saving task 3 ***\n");
return (FALSE);
}
return (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");
timer_detach(&ti1);
timer_detach(&ti2);
timer_detach(&ti3);
sleep(2);
printf("destroyed\n");
}