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: 11035d,b65739503d72f172 X-Google-Attributes: gid11035d,public X-Google-Thread: 103376,b65739503d72f172 X-Google-Attributes: gid103376,public From: Simon Wright Subject: Re: Timers in application Date: 1999/06/09 Message-ID: #1/1 X-Deja-AN: 487610891 X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 References: <375D1E02.8F1C0D6E@res.raytheon.com> X-Trace: news.demon.co.uk 928956056 nnrp-02:20708 NO-IDENT pogner.demon.co.uk:158.152.70.98 Organization: At Home Newsgroups: comp.unix.solaris,comp.lang.ada X-Complaints-To: abuse@demon.net Date: 1999-06-09T00:00:00+00:00 List-Id: askeya writes: > Any other ideas for timer services I can use? I need a granularity of > at least 100 milliseconds, but faster would be better. I am developing > in Ada95 but can create interfaces into standard C libs if necessary. The standard timer resolution on Solaris (SPARC, anyway? -- you don't say) is 10 mS. In Solaris 2.6 you can change this to 1 mS by a setting in /etc/system; I think it's set hires_tick 1 but mail me at work (see below) for an accurate answer. The '1' above is a boolean value, by the way, not a count of milliseconds! We have had good experiences using this with GNAT and "delay until". I haven't looked in detail, but I think that behind the scenes GNAT manages its own list of delays; when a new delay is posted, it checks the interval against the current remaining interval and cancels/reposts the system timer if required. Exactly as you will have to do by hand if you decide not to use the language features. Personally I would do the tasking/timer stuff in Ada even if I was using a lot of stuff written in C. I prefer to let someone else worry about the vagaries of pthreads! -- Simon Wright Work Email: simon.j.wright@gecm.com Alenia Marconi Systems Voice: +44(0)1705-701778 Integrated Systems Division FAX: +44(0)1705-701800