Email: watanaby@is.saga-u.ac.jp
**************************************************/
+/*** alarms example ****
+This case, the alarms are ringed after 5 and 8 seconds
+
+int main(void)
+{
+ AddAlarm("alarm1", 8, FALSE, func1);
+ AddAlarm("alarm2", 5, FALSE, func2);
+ EnableAlarm();
+ }
+void func1(int signo){
+ printf("func1 is called at %d\n",time(NULL));
+}
+void func2(int signo){
+ printf("func2 is called at %d\n",time(NULL));
+}
+**********/
+
#include "opengatemmng.h"
typedef struct alarm{ /* an item in the alarm list */
static Alarm *pRunningAlarm=NULL;
static Alarm *pAlarmTop=NULL;
-/*** alarms example ****
-This case, the alarms are ringed after 5 and 8 seconds
-
-int main(void)
-{
- AddAlarm("alarm1", 8, FALSE, func1);
- AddAlarm("alarm2", 5, FALSE, func2);
- EnableAlarm();
- }
-void func1(int signo){
- printf("func1 is called at %d\n",time(NULL));
-}
-void func2(int signo){
- printf("func2 is called at %d\n",time(NULL));
-}
-**********/
/***************************************************
Add a new alarm named <name>, which calls