Bidwatcher port

Matthew Hunt mph at astro.caltech.edu
Fri Sep 5 09:18:51 PDT 2003


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 at astro.caltech.edu> * Stay close to the Vorlon.
http://www.pobox.com/~mph/           *


More information about the freebsd-ports mailing list