2004-04-05 20:56:19 +00:00
|
|
|
/*
|
2004-04-06 09:49:26 +00:00
|
|
|
* Pseudo-random plugin. Just an example.
|
|
|
|
*
|
|
|
|
* $Id$
|
2004-04-05 20:56:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2004-04-06 09:49:26 +00:00
|
|
|
char *
|
2004-04-05 20:56:19 +00:00
|
|
|
init (const int argc, const char *argv[])
|
|
|
|
{
|
|
|
|
struct timeval tv;
|
|
|
|
(void) gettimeofday (&tv, (struct timezone *) NULL);
|
|
|
|
srand (tv.tv_usec);
|
2004-04-06 09:49:26 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void start ()
|
|
|
|
{
|
2004-04-05 20:56:19 +00:00
|
|
|
}
|
|
|
|
|
2004-04-06 20:30:06 +00:00
|
|
|
int
|
2004-04-05 20:56:19 +00:00
|
|
|
execute ()
|
|
|
|
{
|
|
|
|
usleep (rand () % 1000000);
|
2004-04-06 20:30:06 +00:00
|
|
|
return 1;
|
2004-04-05 20:56:19 +00:00
|
|
|
}
|
2004-04-06 20:30:06 +00:00
|
|
|
|
|
|
|
void terminate() {}
|