comp.lang.ada
 help / color / mirror / Atom feed
* Ada 95 Timers: Any Alternatives Available, Storage, Efficiency, Reliability, Accuracy, Et Cetera Issues?
@ 2019-05-30 13:57 Felix_The_Cat@gmail.com
  2019-05-30 15:34 ` Niklas Holsti
  0 siblings, 1 reply; 4+ messages in thread
From: Felix_The_Cat@gmail.com @ 2019-05-30 13:57 UTC (permalink / raw)



What are the limitations of the "with Timer;" in Ada 95? Basically, is there anything that I should be watching to catch in a program?

Do you have example code that demonstrates any important limitations?

Do I have alternative timers to choose from? Which is the best timer to use? I want to simply do something in the Ada code when the timer counts down to 0.

I know that there are limitations on timers in general because of the system clock and load of the computer. Is there anything else that I should know and prepare my  Ada code for? Do you have example code?

Thank you,


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada 95 Timers: Any Alternatives Available, Storage, Efficiency, Reliability, Accuracy, Et Cetera Issues?
  2019-05-30 13:57 Ada 95 Timers: Any Alternatives Available, Storage, Efficiency, Reliability, Accuracy, Et Cetera Issues? Felix_The_Cat@gmail.com
@ 2019-05-30 15:34 ` Niklas Holsti
  2019-05-30 16:20   ` Dmitry A. Kazakov
  2019-06-11 16:25   ` Norman Worth
  0 siblings, 2 replies; 4+ messages in thread
From: Niklas Holsti @ 2019-05-30 15:34 UTC (permalink / raw)


On 19-05-30 16:57 , Felix_The_Cat@gmail.com wrote:
>
> What are the limitations of the "with Timer;" in Ada 95?

Not understood. There is no standard "package Timer" in Ada 95 (nor 
other Ada standards, AFAIK).

> I want to simply do something in the Ada code when the timer
> counts down to 0.

That sounds like some HW timer. Normally you would not use those 
directly, but instead use the "delay" or "delay until" statements, to 
wait until the actual time when something should be done, and let the 
compiler and run-time system handle the HW timers.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada 95 Timers: Any Alternatives Available, Storage, Efficiency, Reliability, Accuracy, Et Cetera Issues?
  2019-05-30 15:34 ` Niklas Holsti
@ 2019-05-30 16:20   ` Dmitry A. Kazakov
  2019-06-11 16:25   ` Norman Worth
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry A. Kazakov @ 2019-05-30 16:20 UTC (permalink / raw)


On 2019-05-30 17:34, Niklas Holsti wrote:
> On 19-05-30 16:57 , Felix_The_Cat@gmail.com wrote:
>>
>> What are the limitations of the "with Timer;" in Ada 95?
> 
> Not understood. There is no standard "package Timer" in Ada 95 (nor 
> other Ada standards, AFAIK).

It looks that the OP meant Ada.Execution_Time.Timers.

>> I want to simply do something in the Ada code when the timer
>> counts down to 0.
> 
> That sounds like some HW timer. Normally you would not use those 
> directly, but instead use the "delay" or "delay until" statements, to 
> wait until the actual time when something should be done, and let the 
> compiler and run-time system handle the HW timers.

Right, alternatives could also be timed entry call (9.7.2) and delay 
alternative of selective accept (9.7.1).

As for limitations of Ada.Execution_Time.Timers they are from the SW 
design POV. Scheduled actions usually interact with the program logic, 
the states of program objects, the context of the task performing these 
actions. Ada.Execution_Time.Timers are too low-level for a that.

The intended use of Ada.Execution_Time.Timers is for something quite 
decoupled from the program itself, e.g. I can imagine a system health 
monitoring based on Ada.Execution_Time.Timers.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada 95 Timers: Any Alternatives Available, Storage, Efficiency, Reliability, Accuracy, Et Cetera Issues?
  2019-05-30 15:34 ` Niklas Holsti
  2019-05-30 16:20   ` Dmitry A. Kazakov
@ 2019-06-11 16:25   ` Norman Worth
  1 sibling, 0 replies; 4+ messages in thread
From: Norman Worth @ 2019-06-11 16:25 UTC (permalink / raw)


Niklas Holsti wrote:
> On 19-05-30 16:57 , Felix_The_Cat@gmail.com wrote:
>>
>> What are the limitations of the "with Timer;" in Ada 95?
> 
> Not understood. There is no standard "package Timer" in Ada 95 (nor 
> other Ada standards, AFAIK).
> 
>> I want to simply do something in the Ada code when the timer
>> counts down to 0.
> 
> That sounds like some HW timer. Normally you would not use those 
> directly, but instead use the "delay" or "delay until" statements, to 
> wait until the actual time when something should be done, and let the 
> compiler and run-time system handle the HW timers.
> 
It sounds like you want to use a delay statement.  If you just want to 
wait until the timer expires, a simply delay will do.  If you want to do 
something during the delay, use a task with a delay statement in an entry.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-11 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 13:57 Ada 95 Timers: Any Alternatives Available, Storage, Efficiency, Reliability, Accuracy, Et Cetera Issues? Felix_The_Cat@gmail.com
2019-05-30 15:34 ` Niklas Holsti
2019-05-30 16:20   ` Dmitry A. Kazakov
2019-06-11 16:25   ` Norman Worth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox