comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: re: scheduler program in Ada
Date: 1998/06/06
Date: 1998-06-06T00:00:00+00:00	[thread overview]
Message-ID: <6la99o$jcu@lotho.delphi.com> (raw)


>Not having too much experience with the tasking facilities of Ada, is there
>anything else I can do?
Assuming the offsets in the file are in increasing order, it sounds
sort of like a merge between wall clock ticks and the to-do file.
Will something along these lines do what you want?
  start_time : ada.calendar.time := ada.calendar.clock;
  now: duration := 0;  -- duration since start_time
begin
  open the todo file containing records with (offset, job)
  loop
    read next todo record
    if todo.offset > now then
      delay todo.offset-now;
      now := ada.calendar.clock - start_time;
    end if;
    start todo.job
  end loop;




             reply	other threads:[~1998-06-06  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-06  0:00 tmoran [this message]
1998-06-06  0:00 ` scheduler program in Ada Samuel Tardieu
  -- strict thread matches above, loose matches on Subject: below --
1998-06-05  0:00 Rolf Ebert
replies disabled

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