home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
348.lha
/
chatterbox_v1.0
/
sources
/
setwait.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-02-14
|
657b
|
30 lines
#include <exec/types.h>
#include <functions.h>
#include <devices/timer.h>
#define MATCH 0
extern int gab_interval;
extern int minimum_timer_interval, maximum_timer_interval;
extern struct timerequest *tr;
void set_wait_seconds(timer_request,delay_seconds)
struct timerequest *timer_request;
long delay_seconds;
{
timer_request->tr_node.io_Command = TR_ADDREQUEST;
timer_request->tr_time.tv_secs = delay_seconds;
timer_request->tr_time.tv_micro = 0;
SendIO(timer_request);
}
determine_and_set_wait_seconds()
{
gab_interval = minimum_timer_interval
+ rando(maximum_timer_interval - minimum_timer_interval);
set_wait_seconds(tr,gab_interval);
}