From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkfcF-0007m3-Ta for qemu-devel@nongnu.org; Tue, 10 Jan 2012 12:36:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkfcB-0003Xq-RG for qemu-devel@nongnu.org; Tue, 10 Jan 2012 12:36:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkfcB-0003XE-I7 for qemu-devel@nongnu.org; Tue, 10 Jan 2012 12:36:03 -0500 Date: Tue, 10 Jan 2012 14:51:07 -0200 From: Marcelo Tosatti Message-ID: <20120110165107.GA2730@amt.cnet> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 1/3]use int64 when compare two time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "aliguori@us.ibm.com" , "kvm@vger.kernel.org" , "Shan, Haitao" , "qemu-devel@nongnu.org" , "avi@redhat.com" , "Zhang, Yang Z" On Fri, Jan 06, 2012 at 01:20:55PM +0000, Peter Maydell wrote: > On 6 January 2012 07:37, Zhang, Yang Z 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.