Papageno
An Advanced Pattern Matching Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ppg_time.h
Go to the documentation of this file.
1 /* Copyright 2017 noseglasses <shinynoseglasses@gmail.com>
2  *
3  * This program is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef PPG_TIME_H
18 #define PPG_TIME_H
19 
22 #include "ppg_settings.h"
23 
24 #include <stdint.h>
25 
30 typedef void (*PPG_Time_Fun)(PPG_Time *time);
31 
40 typedef void (*PPG_Time_Difference_Fun)(PPG_Time time1, PPG_Time time2, PPG_Time *delta);
41 
50 typedef PPG_Time_Comparison_Result_Type (*PPG_Time_Comparison_Fun)(
51  PPG_Time time1, PPG_Time time2);
52 
55 typedef struct {
60 
63 void ppg_time_manager_init(PPG_Time_Manager *time_manager);
64 
71 
77 
78 #endif
void(* PPG_Time_Difference_Fun)(PPG_Time time1, PPG_Time time2, PPG_Time *delta)
Function type of a callback that computes differences between time values.
Definition: ppg_time.h:40
PPG_Time_Difference_Fun time_difference
Computes time differences.
Definition: ppg_time.h:57
void ppg_time_manager_init(PPG_Time_Manager *time_manager)
Initializes a time manager.
PPG_Time_Comparison_Fun compare_times
Compares time values.
Definition: ppg_time.h:58
PPG_Time_Fun time
Retreives time.
Definition: ppg_time.h:56
PPG_Time_Manager ppg_global_get_time_manager(void)
Retreives the currently active global time manager.
PPG_Time_Manager ppg_global_set_time_manager(PPG_Time_Manager time_manager)
Sets a new global time manager.
void(* PPG_Time_Fun)(PPG_Time *time)
Function type of a callback that computes the current time.
Definition: ppg_time.h:30
PPG_Time_Comparison_Result_Type(* PPG_Time_Comparison_Fun)(PPG_Time time1, PPG_Time time2)
Function type for time comparisons.
Definition: ppg_time.h:50
A collection of functions for time handling.
Definition: ppg_time.h:55