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

CSTimer API



Hi everybody,

I have been using the CSTimer and Alternative classes in JCSP. I noticed there is no 'getAlarm()' method to match the 'setAlarm(long)' method of CSTimer. Is there a reason why this cannot be provided?

Suppose I have a throttle thread that allows messages through at a timed rate. It has a command channel by which I can control the rate. My thread includes a CSTimer. Each iteration, this blocks the thread inside an alt.priSelect() (giving priority to pre-emptive commands whilst waiting for the timeout). If a command to change the rate is received, the CSTimer alarm needs changing, but I don't know what the original alarm was unless I keep my own copy of it - surely redundant. A 'getAlarm()' method would appear to be needed.

Aside from this, I might add that CSTimer is very easy to use and makes such tasks nice and easy.

Regards,
Rick






--
Registered Office: Roke Manor Research Ltd, Siemens House, Oldbury, Bracknell,
Berkshire. RG12 8FZ

The information contained in this e-mail and any attachments is confidential to
Roke Manor Research Ltd and must not be passed to any third party without
permission. This communication is for information only and shall not create or
change any contractual relationship.