Skip to Content.
Sympa Menu

freetds - Re: [freetds] Query Time Out

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Query Time Out
  • Date: Fri, 11 Aug 2006 11:08:32 +0200

>
> On Aug 8, 7:00pm, freddyz77 AT tin.it (Frediano Ziglio) wrote:
> -- Subject: Re: [freetds] Query Time Out
>
> | Hi Christos,
> | I used time mainly for... historic reasons! That is code was just
> | here... why should we use gettimeofday instead? We need only second
> | precision.
>
> Not a problem, it is just that time(3) is usually a wrapper for
> gettimeofday(2), and you get the extra precision for free. In my
> experience having more precision is always better even if you
> don't need it right now.
>
> christos

Mmmm... why not using clock_gettime where available then?

Looking at qemu sources I found this funny function. I always don't
liked very much gettimeofday for such computation. The reason? The main
problem is that this function (time and ftime have same problem) is
bound to local time since midnight. For this reason clock may go
backward when time is adjusted for locale setting (from/to daylight
saving time). For the same reason (I think) my X goes blank for some
seconds when ntp adjust the time... clock_gettime(CLOCK_MONOTONIC, ...)
is posix and don't have this problem.

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page