[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3]use int64 when compare two time
From: |
Marcelo Tosatti |
Subject: |
Re: [Qemu-devel] [PATCH 1/3]use int64 when compare two time |
Date: |
Tue, 10 Jan 2012 14:51:07 -0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jan 06, 2012 at 01:20:55PM +0000, Peter Maydell wrote:
> On 6 January 2012 07:37, Zhang, Yang Z <address@hidden> wrote:
> > use int64 when compare two time
> >
> > int32 only represent only 136 years when comparing two times based on
> > second. It would be better to use int64.
>
> "int32", "int32_t" and "'int' which happens to be 32 bit" are all
> different types;
> your changelog message is confusing them.
>
> Anyway, maybe we should be using time_t here? The functions use that
> internally anyway so is there a reason not to just use it in the API too?
time_t contains seconds since Epoch, which is not the case with
offsets in qemu_get_timedate/qemu_timedate_diff.