From mboxrd@z Thu Jan 1 00:00:00 1970
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me
X-Spam-Level:
X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID
autolearn=no autolearn_force=no version=3.4.4
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103376,2ead6cfaad7d134b
X-Google-Attributes: gid103376,public
From: tmoran@bix.com
Subject: re: scheduler program in Ada
Date: 1998/06/06
Message-ID: <6la99o$jcu@lotho.delphi.com>#1/1
X-Deja-AN: 360021111
Organization: Delphi Internet Services
Newsgroups: comp.lang.ada
Date: 1998-06-06T00:00:00+00:00
List-Id:
>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;