swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initial schedule values


From: Marcus G. Daniels
Subject: Re: Initial schedule values
Date: 17 Feb 2000 09:40:50 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "D3" == Doug Donalson <address@hidden> writes:

D3> Suppose I define a schedule the following way:

  concGroupType = [ConcurrentSchedule customizeBegin: [self getZone]];
  [concGroupType setAutoDrop: 1];
  concGroupType  = [concGroupType customizeEnd];

  eventSchedule = [Schedule createBegin: [self getZone]];
  [eventSchedule setAutoDrop: 1];
  [eventSchedule setConcurrentGroupType: concGroupType];
  eventSchedule = [eventSchedule createEnd];

It's not relevant to the question, but what are you trying to
accomplish with this?  As soon as the second action is added with the
same time on eventSchedule, the ConcurrentSchedule will bail.  The
idea with ConcurrentSchedule is that it is subclassed to use other
information (e.g. activation order), to determine how to sequence
concurrent events.

D3> Now suppose I immediately do the following operations (note the
D3> schedule is not yet activated):

  index = [eventSchedule begin: [self getZone] ];
  actionAtTime = [index next]
  timeOfAction = (timeval_t) [index getKey];  // key of member is time value

D3> What should the value "timeOfAction" of be?
D3> My value seems to be 18 which might imply unilitialized.

It should be the the time of the first scheduled action.  AutoDrop
isn't relevant since nothing has been activated.  If no actions
are scheduled, the value should be zero (actually, as a matter
of style, you should really be checking the status of an index before
blindly accepting values from getKey).

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]