From owner-freebsd-ports@FreeBSD.ORG Fri Sep 5 09:18:51 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C8E716A4BF for ; Fri, 5 Sep 2003 09:18:51 -0700 (PDT) Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.103.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D19C43FAF for ; Fri, 5 Sep 2003 09:18:50 -0700 (PDT) (envelope-from mph@wopr.caltech.edu) Received: from wopr.caltech.edu (localhost.caltech.edu [127.0.0.1]) by wopr.caltech.edu (8.12.9/8.12.8) with ESMTP id h85GInvg009224; Fri, 5 Sep 2003 09:18:49 -0700 (PDT) (envelope-from mph@wopr.caltech.edu) Received: (from mph@localhost) by wopr.caltech.edu (8.12.9/8.12.9/Submit) id h85GImNM009223; Fri, 5 Sep 2003 09:18:48 -0700 (PDT) Date: Fri, 5 Sep 2003 09:18:48 -0700 From: Matthew Hunt To: Annelise Anderson Message-ID: <20030905161847.GA9081@wopr.caltech.edu> References: <20030905023534.GA561@wopr.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i cc: freebsd-ports@freebsd.org cc: Kris Kennaway Subject: Re: Bidwatcher port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2003 16:18:51 -0000 On Thu, Sep 04, 2003 at 08:32:02PM -0700, Annelise Anderson wrote: > It was my impression that TIMEFUDGE is a product of the patch and is not > in the original code. Sure, the term TIMEFUDGE does not appear in the source, but there is a hard-coded 300 second delay. The point of adding TIMEFUDGE is to allow you to change this to 0 or some other value, instead of being stuck with 300. Take a look at the patch: - timeDiff += 5*60; + timeDiff += TIMEFUDGE; This is around line 4346 of bidwatcher.cpp. The 5*60 second delay is in the original code, it just doesn't have a name. > I've built it outside the ports collection at times and gotten no > delay. The delay appears to be used if and only if the local clock cannot be synchronized to the eBay clock. If the original code does not use a 300 s fudge, it's because the clock was synchronized correctly. In that case neither will the port. When TIMEFUDGE is set to 300, the original code and the port's code work identically in all cases. Note that TIMEFUDGE (or the original code's hardcoded delay) are only used if you see this message: showError("WARNING: Couldn't reach eBay, using local clock." " Do not depend on times or sniping."); > Five minutes is enormous--it gives your opponents plenty of > time to outbid you; and that's the whole idea of sniping--coming in > at the end with a bid to which no one has time to respond. I agree. That's why I added TIMEFUDGE and even the comment: // In the era of accurate timekeeping, it's not clear that this is // necessary, so we allow TIMEFUDGE to be set when building the // FreeBSD port. -mph If you don't change TIMEFUDGE from 300, the behavior of the port is identical to the original code. I gave the number a name (TIMEFUDGE) so that you can set it to 0 for more sensible behavior. Matt -- Matthew Hunt * Stay close to the Vorlon. http://www.pobox.com/~mph/ *