diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-17 09:43:50 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-17 09:43:50 +0000 |
commit | 4c279bdf3ae80ab194c2f8b9d27680fb4e6841a8 (patch) | |
tree | b9b9e5184351472c3e45eacc8a98388f0ad46d3a | |
parent | 3dc1cb3428f8661f99e03cfac6f5aedf3d614927 (diff) |
win32 compilation fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2111 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | vl.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -4539,7 +4539,11 @@ void do_savevm(const char *name) BlockDriverInfo bdi1, *bdi = &bdi1; QEMUFile *f; int saved_vm_running; +#ifdef _WIN32 + struct _timeb tb; +#else struct timeval tv; +#endif bs = get_bs_snapshots(); if (!bs) { @@ -4567,9 +4571,15 @@ void do_savevm(const char *name) } /* fill auxiliary fields */ +#ifdef _WIN32 + _ftime(&tb); + sn->date_sec = tb.time; + sn->date_nsec = tb.millitm * 1000000; +#else gettimeofday(&tv, NULL); sn->date_sec = tv.tv_sec; sn->date_nsec = tv.tv_usec * 1000; +#endif sn->vm_clock_nsec = qemu_get_clock(vm_clock); if (bdrv_get_info(bs, bdi) < 0 || bdi->vm_state_offset <= 0) { |