OSDN Git Service

modified comments
[opengatem/opengatem.git] / mngsrc / alarms.c
index d2d9645..8c790fe 100644 (file)
@@ -22,6 +22,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 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 */
@@ -44,22 +61,6 @@ static Sigfunc *defaultSigfunc;
 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