1 /*
2 * alarm.h
3 * DIN Is Noise is copyright (c) 2006-2021 Jagannathan Sampath
4 * DIN Is Noise is released under GNU Public License 2.0
5 * For more information, please visit https://dinisnoise.org/
6 */
7 
8 #ifndef __ALARM__
9 #define __ALARM__
10 
11 struct alarm_t {
12 	double triggert;
13   double startt;
14 	double nowt;
15   double edget;
16   double elapsed;
17   int active;
18   alarm_t (double tt = 1.0);
19   int operator() (double t);
20 	double operator() ();
21   void start ();
22   void stop ();
23 };
24 
25 #endif
26