Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Sep 2003 09:18:48 -0700
From:      Matthew Hunt <mph@astro.caltech.edu>
To:        Annelise Anderson <andrsn@andrsn.stanford.edu>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: Bidwatcher port
Message-ID:  <20030905161847.GA9081@wopr.caltech.edu>
In-Reply-To: <Pine.BSF.4.10.10309042020040.13967-100000@andrsn.stanford.edu>
References:  <20030905023534.GA561@wopr.caltech.edu> <Pine.BSF.4.10.10309042020040.13967-100000@andrsn.stanford.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <mph@astro.caltech.edu> * Stay close to the Vorlon.
http://www.pobox.com/~mph/           *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030905161847.GA9081>