Ada_Ru форум

Обсуждение языка Ада

Re: [F802-001 public] - GNAT GPL 2006 wrong duration of delay untill.

Оставить новое сообщение

Сообщения

Dmitriy Anisimkov
Re: [F802-001 public] - GNAT GPL 2006 wrong duration of delay untill.
2006-08-09 07:41:20

Pascal Obry wrote:

 

>Ok, for this adjustment. But the Ada.Calendar.Clock is also adjusted. >See the GNAT implementation.

 

I think the error is in the implementation. As a GNAT user i do not need to know implementation. I just use interfaces.

 

It could be the case that there is a slight

>shift between the performance counter and the system time.

 

 

>and remain increased forever.

 

 

 

>Because "delay until" is based on the monotonic clock (Ada.Realtime)

 

Why "delay until" does *not* accept Ada.Real_Time.Time, but *do* accept Ada.Calendar.Time ?

--- In ada_ru@yahoogroups.com, Dmitriy Anisimkov <anisimkov@...> wrote:

Why "delay until" does *not* accept Ada.Real_Time.Time, but *do* accept Ada.Calendar.Time ?

 

It does accept Ada.Real_Time.Time. You should use Time_Span instead of Duration:

 

with Ada.Real_Time; use Ada.Real_Time;

...

 

delay until Clock + To_Time_Span (10.0);

kazakov1961 wrote:

 

--- In ada_ru@yahoogroups.com <mailto:ada_ru%40yahoogroups.com>, Dmitriy Anisimkov <anisimkov@...> wrote:

 

Why "delay until" does *not* accept Ada.Real_Time.Time, but *do* accept Ada.Calendar.Time ?

 

It does accept Ada.Real_Time.Time. You should use Time_Span instead of Duration:

 

Да, действительно.

Новое сообщение:
Страницы: 1

Чтобы оставить новое сообщение необходимо Зарегистрироваться и Войти