* [Qemu-devel] [PATCH] monitor-mux: fix timestamp prefixes
@ 2009-01-20 12:56 Jan Kiszka
2009-01-22 17:20 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2009-01-20 12:56 UTC (permalink / raw)
To: qemu-devel@nongnu.org
rt_clock returns milliseconds. Fix mux'ed monitor terminal timestamps
accordingly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
qemu-char.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index ac431c7..f849187 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -241,13 +241,13 @@ static int mux_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
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 related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] monitor-mux: fix timestamp prefixes
2009-01-20 12:56 [Qemu-devel] [PATCH] monitor-mux: fix timestamp prefixes Jan Kiszka
@ 2009-01-22 17:20 ` Anthony Liguori
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2009-01-22 17:20 UTC (permalink / raw)
To: qemu-devel
Jan Kiszka wrote:
> rt_clock returns milliseconds. Fix mux'ed monitor terminal timestamps
> accordingly.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
>
> qemu-char.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index ac431c7..f849187 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -241,13 +241,13 @@ static int mux_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
> 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] 2+ messages in thread
end of thread, other threads:[~2009-01-22 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 12:56 [Qemu-devel] [PATCH] monitor-mux: fix timestamp prefixes Jan Kiszka
2009-01-22 17:20 ` 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).