qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6399] monitor-mux: fix timestamp prefixes (Jan Kiszka)
@ 2009-01-22 17:15 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-01-22 17:15 UTC (permalink / raw)
  To: qemu-devel

Revision: 6399
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6399
Author:   aliguori
Date:     2009-01-22 17:15:16 +0000 (Thu, 22 Jan 2009)

Log Message:
-----------
monitor-mux: fix timestamp prefixes (Jan Kiszka)

rt_clock returns milliseconds. Fix mux'ed monitor terminal timestamps
accordingly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/qemu-char.c

Modified: trunk/qemu-char.c
===================================================================
--- trunk/qemu-char.c	2009-01-22 16:59:28 UTC (rev 6398)
+++ trunk/qemu-char.c	2009-01-22 17:15:16 UTC (rev 6399)
@@ -241,13 +241,13 @@
                 if (term_timestamps_start == -1)
                     term_timestamps_start = ti;
                 ti -= term_timestamps_start;
-                secs = ti / 1000000000;
+                secs = ti / 1000;
                 snprintf(buf1, sizeof(buf1),
                          "[%02d:%02d:%02d.%03d] ",
                          secs / 3600,
                          (secs / 60) % 60,
                          secs % 60,
-                         (int)((ti / 1000000) % 1000));
+                         (int)(ti % 1000));
                 d->drv->chr_write(d->drv, (uint8_t *)buf1, strlen(buf1));
             }
         }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-22 17:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 17:15 [Qemu-devel] [6399] monitor-mux: fix timestamp prefixes (Jan Kiszka) Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).