[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: accessing counter
From: |
Marcus G. Daniels |
Subject: |
Re: accessing counter |
Date: |
27 Jun 1999 19:49:23 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.3.10 |
>>>>> "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.