isr@rodan.acs.syr.edu (Michael S. Schechter ) (05/03/90)
Hi, I'm going crazy trying to get the Time Manager to work..
below is my code. Obviously tasknull() isn't going to do anything,
but even stripped like this, what i get is a system hang - neither Macsbug
or Aztec's SDB respond to the interrupt switch.
#define TIMERTASKS 5
long TWhen[TIMERTASKS];
TMTask TTasks[TIMERTASKS];
tasknull()
{return();}
TTasks[0].tmAddr=(ProcPtr)tasknull;
TTasks[1].tmAddr=(ProcPtr)tasknull;
TTasks[2].tmAddr=(ProcPtr)tasknull;
TTasks[3].tmAddr=(ProcPtr)tasknull;
TTasks[4].tmAddr=(ProcPtr)tasknull;
for(i=0;i<TIMERTASKS;i++)
InsTime(&TTasks[i])
TWhen[0]=(long)(1000.0*TTL0on); /* TTL0on, etc. are floats and */
TWhen[1]=(long)(1000.0*TTL0off); /* have values of .5 to 5.5 */
TWhen[2]=(long)(1000.0*TTL1on);
TWhen[3]=(long)(1000.0*TTL1off);
TWhen[4]=(long)(1000.0*TimeToStop);
for(i=0;i<TIMERTASKS;i++)
PrimeTime(&TTasks[i],TWhen[i]);
Now i re-SetIText and re-draw a complicated DLOG, then draw some small
bitmap-only PICTs, then wait in a while(!Button()) loop.
Can anyone tell me what I'm doing wrong here? With the
PrimeTime commented out, things work fine. With it in,
I get hangs.
Oh, this is on a orig. Mac II, only INTs are Macsbug, RegisterName,
Netmodem startup, Suitcase, and TOPS (but TOPS isn't being used)
Thanks, Mike