diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-22 17:15:16 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-22 17:15:16 +0000 |
commit | 6d70f746c9794af821e00e6a19f05063363f3753 (patch) | |
tree | ba688bb7b889c13393da8cfe49ecb6c84390cb29 /qemu-char.c | |
parent | e62cac54687669cfaebd4f36af0841bec8d043f1 (diff) | |
download | qemu-6d70f746c9794af821e00e6a19f05063363f3753.tar.gz qemu-6d70f746c9794af821e00e6a19f05063363f3753.tar.bz2 qemu-6d70f746c9794af821e00e6a19f05063363f3753.zip |
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>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6399 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-char.c b/qemu-char.c index ac431c7c5c..f8491878be 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)); } } |