comp.lang.ada
 help / color / mirror / Atom feed
From: Alex <henningssonalex@gmail.com>
Subject: Re: Watchdog-Timer Assignment
Date: Sat, 22 Sep 2018 04:56:37 -0700 (PDT)
Date: 2018-09-22T04:56:37-07:00	[thread overview]
Message-ID: <8a22a5d0-c96e-46af-8541-8672b474db6e@googlegroups.com> (raw)
In-Reply-To: <ccfc23e7-90f2-45c4-a01e-d5d33fdef55c@googlegroups.com>

> This?
> 
>     Function Next_Second return Ada.Calendar.Time is
> 	Use Ada.Calendar;
> 	Now       : Time renames Clock;
> 	Second    : Duration renames Seconds(Now);
> 	Trunc     : Constant Natural  := Natural(Second);
> 	Rounded   : Constant Duration := Duration(Trunc);
> 	Year      : Year_Number;
> 	Month     : Month_Number;
> 	Day       : Day_Number;
> 	S         : Duration;
>     Begin
> 	Split(
>           Date    => Now,
>           Year    => Year,
>           Month   => Month,
>           Day     => Day,
>           Seconds => S
>          );
> 	return Time_Of(Year, Month, Day,
> 	  (if Rounded < Second
> 	   then Rounded + 1.0
> 	   else Rounded
> 	  ));
>     End Next_Second;

This I haven't seen! But that might work, I shall try. Even though I do not believe we had to do our own function, but that might work anyways. I will try. Thank you!

      reply	other threads:[~2018-09-22 11:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 10:29 Watchdog-Timer Assignment Alex
2018-09-21 22:35 ` Shark8
2018-09-21 23:13   ` Alex
2018-09-22  7:04     ` Simon Wright
2018-09-22 11:58       ` Alex
2018-09-22  2:34 ` Anh Vo
2018-09-22 11:54   ` Alex
2018-09-22 13:18     ` Dennis Lee Bieber
2018-09-25 17:05     ` Anh Vo
2018-09-22  3:29 ` Shark8
2018-09-22 11:56   ` Alex [this message]
replies disabled

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