Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Implement timer interface #32

Closed
senier opened this issue Apr 4, 2019 · 2 comments
Closed

Implement timer interface #32

senier opened this issue Apr 4, 2019 · 2 comments
Assignees

Comments

@senier
Copy link
Member

senier commented Apr 4, 2019

This interface allows users to request the current monotonic time (similar to Clock in Ada.Real_Time). We should also think about function to retrieve precision and bounds of the timer.

@jklmnn
Copy link
Member

jklmnn commented Apr 17, 2019

Proposed timer client interface:

package Cai.Timer is

   type Time is new Duration;

   function "+" (Left : Time; Right : Duration) return Time;
   function "-" (Left : Time; Right : Duration) return Time;
   function "-" (Left : Time; Right : Time) return Duration;
   
   type Client_Session is limited private;

end Cai.Timer
with Cai.Types;

package Cai.Timer.Client is

   function Create return Client_Session;

   function Initialized (C : Client_Session) return Boolean;

   procedure Initialize (C : in out Client_Session; Cap : Cai.Types.Capability);

   function Clock (C : Client_Session) return Time with
      Volatile_Function;

   procedure Finalize (C : in out Client);

end Cai.Timer.Client;

@jklmnn
Copy link
Member

jklmnn commented Apr 29, 2019

Fixed by #54.

@jklmnn jklmnn closed this as completed Apr 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants