home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!darwin.sura.net!udel!intercon!digex.com!digex.com!not-for-mail
- From: realtime@access.digex.com (REAL TIME Corporation)
- Newsgroups: comp.realtime
- Subject: Re: PSOS+ Timers
- Date: 27 Jan 1993 16:50:30 -0500
- Organization: Express Access Online Communications, Greenbelt, MD USA
- Lines: 42
- Message-ID: <1k7036INNmg8@digex.digex.com>
- References: <1993Jan15.150848.3327@mprgate.mpr.ca>
- NNTP-Posting-Host: access.digex.com
-
- >References: <1993Jan15.150848.3327@mprgate.mpr.ca>
- >Randy Chapman writes:
-
- >Has anybody implemented a timer class in C++ for PSOS+
- >whereby you can create a timer(s) with a callback upon expiry?
- >Implementations is C would help as well.
-
- Here are some solutions to your question:
-
- 1. Use PSOS+ service TM_EVAFTER (Ticks, Events; TNid= )
-
- This will send an event to the calling task after the specified
- time. The task is not blocked, and continues execution.
- Some time after the call, the task will have to call
- PSOS+ again, to see if the event has been posted, or the
- task can wait for the event.
-
- 2. Use PSOS+ service TM_EVWHEN ( Date, Time, Ticks, Events; TMid=)
-
- This will send an event to the calling task at the appointed time.
- Similar to #1 above.
-
- 3. Use TM_EVERY ( Ticks, Events; Tmid= )
-
- This will send an event to the calling task at periodic intervals.
- Depending on the application, this might not be what you want.
- For example: If Ticks=3 and the calling task checks for the event
- flag after 10 ticks, the event will be there, but the task will
- not know that the event was posted 3 times. (at +3 ticks, +6 ticks,
- +9 ticks).
-
- 4. If you need to know how many times the timer expired, you need
- to use PSOS+ messages deposited into a queue. This requires
- some programming effort.
-
- If you need more details, please e_mail.
-
- Naomi Avigdor
- REAL TIME Corporation
-
- realtime@digex.com
-
-