Commit a4bb1db854aa62782399c844b5089ff91d57c941
1 parent
7aea4412
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
Showing
1 changed file
with
2 additions
and
2 deletions
qemu-char.c
... | ... | @@ -241,13 +241,13 @@ static int mux_chr_write(CharDriverState *chr, const uint8_t *buf, int len) |
241 | 241 | if (term_timestamps_start == -1) |
242 | 242 | term_timestamps_start = ti; |
243 | 243 | ti -= term_timestamps_start; |
244 | - secs = ti / 1000000000; | |
244 | + secs = ti / 1000; | |
245 | 245 | snprintf(buf1, sizeof(buf1), |
246 | 246 | "[%02d:%02d:%02d.%03d] ", |
247 | 247 | secs / 3600, |
248 | 248 | (secs / 60) % 60, |
249 | 249 | secs % 60, |
250 | - (int)((ti / 1000000) % 1000)); | |
250 | + (int)(ti % 1000)); | |
251 | 251 | d->drv->chr_write(d->drv, (uint8_t *)buf1, strlen(buf1)); |
252 | 252 | } |
253 | 253 | } | ... | ... |