[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CSTimer API
- To: Java-Threads Mailing List <java-threads@xxxxxxxxxx>
- Subject: CSTimer API
- From: "Beton, Richard" <richard.beton@xxxxxxxxxx>
- Date: Mon, 07 Jul 2003 13:27:24 +0100
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
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.