From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <20120110165107.GA2730@amt.cnet> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Zhang, Yang Z" , "qemu-devel@nongnu.org" , "aliguori@us.ibm.com" , "Shan, Haitao" , "avi@redhat.com" , "kvm@vger.kernel.org" To: Peter Maydell Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61129 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932343Ab2AJRgF (ORCPT ); Tue, 10 Jan 2012 12:36:05 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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.