| Nico Huber | 5e9b1b5 | 2016-10-08 22:09:33 +0200 | [diff] [blame] | 1 | -- |
| 2 | -- Copyright (C) 2015-2016 secunet Security Networks AG |
| 3 | -- |
| 4 | -- This program is free software; you can redistribute it and/or modify |
| 5 | -- it under the terms of the GNU General Public License as published by |
| Nico Huber | aab715f | 2016-10-18 00:22:25 +0200 | [diff] [blame] | 6 | -- the Free Software Foundation; either version 2 of the License, or |
| 7 | -- (at your option) any later version. |
| Nico Huber | 5e9b1b5 | 2016-10-08 22:09:33 +0200 | [diff] [blame] | 8 | -- |
| 9 | -- This program is distributed in the hope that it will be useful, |
| 10 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | -- GNU General Public License for more details. |
| 13 | -- |
| 14 | |
| 15 | private package HW.Time.Timer |
| 16 | with |
| Nico Huber | a6a4909 | 2018-05-18 15:04:12 +0200 | [diff] [blame] | 17 | Abstract_State => ((Timer_State with |
| Adrian-Ken Rueegsegger | 69e9086 | 2020-01-21 13:53:59 +0100 | [diff] [blame^] | 18 | Part_Of => HW.Time.State), |
| Nico Huber | 5e9b1b5 | 2016-10-08 22:09:33 +0200 | [diff] [blame] | 19 | (Abstract_Time with |
| 20 | Part_Of => HW.Time.State, |
| Nico Huber | a6a4909 | 2018-05-18 15:04:12 +0200 | [diff] [blame] | 21 | External => Async_Writers)) |
| Nico Huber | 5e9b1b5 | 2016-10-08 22:09:33 +0200 | [diff] [blame] | 22 | is |
| 23 | |
| 24 | -- Returns the highest point in time that has definitely passed. |
| 25 | function Raw_Value_Min return T |
| 26 | with |
| 27 | Volatile_Function, |
| 28 | Global => (Input => Abstract_Time), |
| 29 | Depends => (Raw_Value_Min'Result => Abstract_Time); |
| 30 | |
| 31 | -- Returns the highest point in time that might have been reached yet. |
| 32 | function Raw_Value_Max return T |
| 33 | with |
| 34 | Volatile_Function, |
| 35 | Global => (Input => Abstract_Time), |
| 36 | Depends => (Raw_Value_Max'Result => Abstract_Time); |
| 37 | |
| 38 | function Hz return T |
| 39 | with |
| Nico Huber | 5e9b1b5 | 2016-10-08 22:09:33 +0200 | [diff] [blame] | 40 | Global => (Input => Timer_State); |
| 41 | |
| 42 | end HW.Time.Timer; |