swarm-support
[Top][All Lists]
Advanced

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

Re: accessing counter


From: Pietro Terna
Subject: Re: accessing counter
Date: Mon, 28 Jun 1999 09:47:10 +0200

        Many tanks, this solves my problem, Pietro

At 19.49 27/06/99 -0700, you wrote:
>>>>>> "PT" == Pietro Terna <address@hidden> writes:
>
>PT> (and, may be, in which sub
>PT> step are we, if n>1 in setRepeatInterval: n)? Obviously, avoiding
>PT> to count them, as I do with my 'count++' line.
>
>There isn't an efficient interface for this.¹ Nonetheless, here's one
>way.  It will probably have adequate performance provided there isn't
>too much in the repeating schedule.
>
>- step
>{
>  timeval_t t;
>  id index = [schedule createIndex: scratchZone
>                       fromMember: getCurrentAction ()];
>  
>  [index get: (id *) &t];
>  printf ("%lu %lu\n", getCurrentTime (), t);
>  [index drop];
>  return self;
>}
>
>¹ The efficient way to get this information is to cast the current
>schedule activity to a statically typed class and dereference to its
>currentIndex.  But I'm not at liberty to reveal specific code for that! :-)
>
>                  ==================================
>   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.
>
>


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