Index: examples/aubiomfcc.c
===================================================================
--- examples/aubiomfcc.c	(revision ce6f652fdaa4e0aacb39cba4193020eea7a4cf14)
+++ examples/aubiomfcc.c	(revision 340cb937f86df50f6630f90ecc9d0c252007fbb8)
@@ -41,7 +41,9 @@
 void process_print (void)
 {
-  /* output times in seconds and extracted mfccs */
-  outmsg("%f\t",blocks*hop_size/(float)samplerate);
-  fvec_print(mfcc_out);
+  /* output times in selected format */
+  print_time (blocks * hop_size);
+  outmsg ("\t");
+  /* output extracted mfcc */
+  fvec_print (mfcc_out);
 }
 
Index: examples/aubioonset.c
===================================================================
--- examples/aubioonset.c	(revision ce6f652fdaa4e0aacb39cba4193020eea7a4cf14)
+++ examples/aubioonset.c	(revision 340cb937f86df50f6630f90ecc9d0c252007fbb8)
@@ -50,5 +50,11 @@
 {
   if ( is_onset ) {
-    outmsg ("%f\n", aubio_onset_get_last_s (o) );
+    if (strcmp (time_format, "samples") == 0) {
+      outmsg ("%d\n", aubio_onset_get_last (o) );
+    } else if (strcmp (time_format, "ms") == 0) {
+      outmsg ("%f\n", aubio_onset_get_last_ms (o) );
+    } else {
+      outmsg ("%f\n", aubio_onset_get_last_s (o) );
+    }
   }
 }
Index: examples/aubiopitch.c
===================================================================
--- examples/aubiopitch.c	(revision ce6f652fdaa4e0aacb39cba4193020eea7a4cf14)
+++ examples/aubiopitch.c	(revision 340cb937f86df50f6630f90ecc9d0c252007fbb8)
@@ -47,6 +47,6 @@
 {
   smpl_t pitch_found = fvec_get_sample(pitch, 0);
-  outmsg("%f %f\n",(blocks)
-      *hop_size/(float)samplerate, pitch_found);
+  print_time(blocks * hop_size);
+  outmsg(" %f\n", pitch_found);
 }
 
Index: examples/aubioquiet.c
===================================================================
--- examples/aubioquiet.c	(revision ce6f652fdaa4e0aacb39cba4193020eea7a4cf14)
+++ examples/aubioquiet.c	(revision 340cb937f86df50f6630f90ecc9d0c252007fbb8)
@@ -39,8 +39,12 @@
 void process_print (void) {
   int curblocks = (blocks - 4) > 0 ? blocks - 4 : 0;
-  if (issilence == -1) {
-    outmsg("NOISY: %f\n",curblocks*hop_size/(float)samplerate);
-  } else if (issilence == 2) {
-    outmsg("QUIET: %f\n",curblocks*hop_size/(float)samplerate);
+  if (issilence == -1 || issilence == 2) {
+    if (issilence == -1) {
+      outmsg ("NOISY: ");
+    } else { // if (issilence == 2) {
+      outmsg ("QUIET: ");
+    }
+    print_time (curblocks * hop_size);
+    outmsg ("\n");
   }
 }
Index: examples/aubiotrack.c
===================================================================
--- examples/aubiotrack.c	(revision ce6f652fdaa4e0aacb39cba4193020eea7a4cf14)
+++ examples/aubiotrack.c	(revision 340cb937f86df50f6630f90ecc9d0c252007fbb8)
@@ -51,5 +51,6 @@
 void process_print (void) {
   if ( is_beat && !is_silence ) {
-    outmsg("%f\n", aubio_tempo_get_last_s(tempo) );
+    print_time (aubio_tempo_get_last (tempo));
+    outmsg ("\n");
   }
 }
Index: examples/parse_args.h
===================================================================
--- examples/parse_args.h	(revision ce6f652fdaa4e0aacb39cba4193020eea7a4cf14)
+++ examples/parse_args.h	(revision 340cb937f86df50f6630f90ecc9d0c252007fbb8)
@@ -35,4 +35,6 @@
 extern char_t * pitch_unit;
 extern smpl_t pitch_tolerance;
+// time stuff
+extern char_t * time_format;
 // tempo stuff
 extern char_t * tempo_method;
@@ -91,4 +93,6 @@
       "       -s      --silence          select silence threshold\n"
       "                 a value in dB, for instance -70, or -100; default=-90\n"
+      "       -T      --time-format      select time values output format\n"
+      "                 (samples, ms, seconds) default=seconds\n"
 #ifdef PROG_HAS_OUTPUT
       "       -m      --mix-input        mix input signal with output signal\n"
@@ -123,4 +127,5 @@
     "p:u:l:"
 #endif /* PROG_HAS_PITCH */
+    "T:"
     "s:mf";
   int next_option;
@@ -148,4 +153,5 @@
 #endif /* PROG_HAS_PITCH */
     {"silence",               1, NULL, 's'},
+    {"time-format",           1, NULL, 'T'},
     {"mix-input",             0, NULL, 'm'},
     {"force-overwrite",       0, NULL, 'f'},
@@ -201,4 +207,7 @@
       case 'l':
         pitch_tolerance = (smpl_t) atof (optarg);
+        break;
+      case 'T':
+        time_format = optarg;
         break;
       case 's':                /* silence threshold */
Index: examples/utils.c
===================================================================
--- examples/utils.c	(revision ce6f652fdaa4e0aacb39cba4193020eea7a4cf14)
+++ examples/utils.c	(revision 340cb937f86df50f6630f90ecc9d0c252007fbb8)
@@ -48,4 +48,6 @@
 char_t * pitch_method = "default";
 smpl_t pitch_tolerance = 0.0; // will be set if != 0.
+// time stuff
+char_t * time_format = "seconds";
 // tempo stuff
 char_t * tempo_method = "default";
@@ -197,8 +199,21 @@
 #endif
   if (velo == 0) {
-    outmsg ("%f\n", blocks * hop_size / (float) samplerate);
-  } else {
-    outmsg ("%f\t%f\t", mpitch, blocks * hop_size / (float) samplerate);
-  }
-}
-
+    print_time (blocks * hop_size);
+    outmsg ("\n");
+  } else {
+    outmsg ("%f\t", mpitch);
+    print_time (blocks * hop_size);
+    outmsg ("\t");
+  }
+}
+
+void print_time (uint_t time_in_samples) {
+  /* output times in selected format */
+  if (strcmp (time_format, "samples") == 0) {
+    outmsg ("%d", time_in_samples);
+  } else if (strcmp (time_format, "ms") == 0) {
+    outmsg ("%f", 1000. * time_in_samples / (float) samplerate);
+  } else {
+    outmsg ("%f", time_in_samples / (float) samplerate);
+  }
+}
Index: examples/utils.h
===================================================================
--- examples/utils.h	(revision ce6f652fdaa4e0aacb39cba4193020eea7a4cf14)
+++ examples/utils.h	(revision 340cb937f86df50f6630f90ecc9d0c252007fbb8)
@@ -57,2 +57,4 @@
 void process_block (fvec_t *ibuf, fvec_t *obuf);
 void process_print (void);
+
+void print_time (uint_t samples);
