qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 2/3] use gettimeofday() instead of time()
@ 2012-01-06  7:37 Zhang, Yang Z
  2012-01-06  7:43 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Yang Z @ 2012-01-06  7:37 UTC (permalink / raw)
  To: qemu-devel@nongnu.org
  Cc: aliguori@us.ibm.com, Shan, Haitao, avi@redhat.com,
	kvm@vger.kernel.org

use gettimeofday() instead of time().

Please refer the patch zero for the description.

Signed-off-by: Yang Zhang <yang.z.zhang@intel.com>

diff --git a/vl.c b/vl.c
index 01c5a9d..9a51047 100644
--- a/vl.c
+++ b/vl.c
@@ -438,8 +438,11 @@ void qemu_get_timedate(struct tm *tm, int64_t offset)
 {
     time_t ti;
     struct tm *ret;
+    struct timeval tv;
+
+    gettimeofday(&tv, NULL);
+    ti = tv.tv_sec;

-    time(&ti);
     ti += offset;
     if (rtc_date_offset == -1) {
         if (rtc_utc)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH 2/3] use gettimeofday() instead of time()
  2012-01-06  7:37 [Qemu-devel] [PATCH 2/3] use gettimeofday() instead of time() Zhang, Yang Z
@ 2012-01-06  7:43 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2012-01-06  7:43 UTC (permalink / raw)
  To: Zhang, Yang Z
  Cc: aliguori@us.ibm.com, kvm@vger.kernel.org, Shan, Haitao,
	qemu-devel@nongnu.org, avi@redhat.com

On Fri, 2012-01-06 at 07:37 +0000, Zhang, Yang Z wrote:
> Please refer the patch zero for the description. 

Each patch should have description about what it does in the changelog,
otherwise you're going to lose important information about the change.

Furthermore, cover letters don't get merged at all, which means that if
someone looks at this patch, he won't have anywhere to refer to to get
the description (besides googling for the original mails I guess).

-- 

Sasha.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-06  7:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-06  7:37 [Qemu-devel] [PATCH 2/3] use gettimeofday() instead of time() Zhang, Yang Z
2012-01-06  7:43 ` Sasha Levin

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).