swarm-support
[Top][All Lists]
Advanced

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

Re: floating point time scheduling


From: Marcus G. Daniels
Subject: Re: floating point time scheduling
Date: 14 Nov 2000 19:15:58 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "AC" == Andre Costa <address@hidden> writes:

AC> My question is: what is the relation between the times returned by

AC>     (int) Globals.env.getCurrentTime()

AC> and the time returned by

AC>     (int) scheduleActivity.getCurrentTime()

The former returns the current time of the current activity. 

In the case of a Schedule configured with a concurrent group type of
ConcurrentSchedule, and an action scheduled and run from that
schedule, the `current' activity will be the [inner] one dynamically created
for groups of fractionally-scheduled actions.  So in this context, the
former call will print out fractional timesteps.

scheduleActivity (the variable used in the DoubleSchedule.java
example), is the activity returned by activating the main schedule.
When you ask for the current time for this activity, you'll get the
time associated with the current position of the activity on the
primary schedule; the coarser non-fractional timesteps.

Keep in mind that an activity tracks a particular schedule, and that
the current time for that activity can only reflect what is in that
particular schedule.  If you want to see what time it is across 
a set of schedules/activities, you need to go `up' in the tree
of activities.  You can do that by using calls like getTopLevelActivity 
(top of activity tree) or getSwarmActivity (the most immediate Swarm),
and then sending getCurrentTime to the returned activity.

                  ==================================
   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]