changeset 195:73f73ac55725

Replace countdown with a time counter
author Sebastien Decugis <sdecugis@nict.go.jp>
date Mon, 08 Feb 2010 17:54:15 +0900
parents d1af490d6e85
children bc530e9dae04
files extensions/dbg_monitor/dbg_monitor.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/dbg_monitor/dbg_monitor.c	Mon Feb 08 17:46:40 2010 +0900
+++ b/extensions/dbg_monitor/dbg_monitor.c	Mon Feb 08 17:54:15 2010 +0900
@@ -62,6 +62,7 @@
 static void * mn_thr(void * arg)
 {
 	sigset_t sig;
+	int i = 0;
 	struct sigaction act;
 	fd_log_threadname("Monitor thread");
 	
@@ -76,9 +77,8 @@
 	/* Loop */
 	while (1) {
 		#ifdef DEBUG
-		int i;
-		for (i=30; i>0; i--) {
-			fd_log_debug("[dbg_monitor] %i\n", i); /* This makes it easier to detect inactivity periods in the log file */
+		for (i++; i % 30; i++) {
+			fd_log_debug("[dbg_monitor] %ih%*im%*is\n", i/3600, 2, i/60, 2, i%60); /* This makes it easier to detect inactivity periods in the log file */
 			sleep(1);
 		}
 		#else /* DEBUG */
"Welcome to our mercurial repository"