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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,412452366233cd28 X-Google-Attributes: gid103376,public From: JD Subject: Re: Gnat Ada95 REAL_TIME ANNEX problemS Date: 1997/07/29 Message-ID: <33DD987C.27@nosc.mil>#1/1 X-Deja-AN: 259888428 Sender: news@nosc.mil References: <33D6E20F.4633@nosc.mil> <199707251330.PAA20083@basement.replay.com> Organization: NCCOSC RDT&E Division, San Diego, CA Reply-To: drummond@nosc.mil Newsgroups: comp.lang.ada Date: 1997-07-29T00:00:00+00:00 List-Id: Anonymous wrote: > > On Thu, 24 Jul 1997 05:03:11 GMT, JD wrote: > > I have been using Ada83 and recently switched to Gnat 3.09 Ada95. > > Part of the code I am writing utilizes timers. The Ada83 version of > > the timer code had used the CALENDAR package, I am trying to change > > this timer code to take advantage of the finer granularity found in > > the Ada95 REAL_TIME package. I have read that `Calendar.Clock' and > > `Real_Time.Clock' are implemented as transformations of the same > > time base. However I can't seem to get the REAL_TIME package to work > > with the "+", and "-" functions. The error from the compilier > > is: > > gnatmake -I../common1 temp_controller > > gcc -c -I./ -I../common1 -I- ../common1/run_time_timer1.adb > > run_time_timer1.adb:97:49: invalid operand types for operator "+" > > run_time_timer1.adb:97:63: expected type "Standard.DURATION" > > run_time_timer1.adb:97:63: found private type "Ada.Real_Time.Time" > > gnatmake: "../common1/run_time_timer1.adb" compilation error > > *** Error code 2 > > make: Fatal error: Command failed for target `all' > .. > > Was it really necessary to post this 5 times? > > Since you haven't posted your code, we can't tell exactly what is wrong. > >From this error message, however, it seems likely that you are using the > types from Ada.Real_Time and the "+" from Ada.Calendar. > > Jeff Carter PGP:1024/440FBE21 Thank you for the possible solution to my problem, I will ckeck this out. I am, however not using the line "with ADA.CALENDAR; use ADA.CALENDAR;, instead I am using "with ADA.REAL_TIME; use ADA.REAL_TIME; -shouldn't this bring in the realtime package? Also sorry about the multiple postings, the newsreader I am using indicated an error every time I had sent a post, and seeing no result of my post on the comp.lang.ada group I continued attempting to transmit a news post. This resulted in 5 unintended posts. JD