osmo_nitb: introduce --no-dbcounter command line option

this allows us to disable writing the current rate counters to the
sqlite database every 60 seconds.
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 001d8f9..5a274e3 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -56,6 +56,7 @@
 extern const char *openbsc_copyright;
 static int daemonize = 0;
 static int use_mncc_sock = 0;
+static int use_db_counter = 1;
 
 /* timer to store statistics */
 #define DB_SYNC_INTERVAL	60, 0
@@ -95,6 +96,7 @@
 	printf("  -P --rtp-proxy Enable the RTP Proxy code inside OpenBSC\n");
 	printf("  -e --log-level number. Set a global loglevel.\n");
 	printf("  -m --mncc-sock Disable built-in MNCC handler and offer socket\n");
+	printf("  -C --no-dbcounter Disable regular syncing of counters to database\n");
 }
 
 static void handle_options(int argc, char **argv)
@@ -115,10 +117,11 @@
 			{"rtp-proxy", 0, 0, 'P'},
 			{"log-level", 1, 0, 'e'},
 			{"mncc-sock", 0, 0, 'm'},
+			{"no-dbcounter", 0, 0, 'C'},
 			{0, 0, 0, 0}
 		};
 
-		c = getopt_long(argc, argv, "hd:Dsl:ar:p:TPVc:e:m",
+		c = getopt_long(argc, argv, "hd:Dsl:ar:p:TPVc:e:mC",
 				long_options, &option_index);
 		if (c == -1)
 			break;
@@ -158,6 +161,9 @@
 		case 'm':
 			use_mncc_sock = 1;
 			break;
+		case 'C':
+			use_db_counter = 0;
+			break;
 		case 'V':
 			print_version(1);
 			exit(0);
@@ -273,7 +279,8 @@
 	/* setup the timer */
 	db_sync_timer.cb = db_sync_timer_cb;
 	db_sync_timer.data = NULL;
-	osmo_timer_schedule(&db_sync_timer, DB_SYNC_INTERVAL);
+	if (use_db_counter)
+		osmo_timer_schedule(&db_sync_timer, DB_SYNC_INTERVAL);
 
 	signal(SIGINT, &signal_handler);
 	signal(SIGABRT, &signal_handler);