Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c
Дата
Msg-id 12656.1034608785@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> Already done -- that's what Denis is unhappy about.

> OK, I see that, but now, we are stuffing everything into a timeval
> struct.  Does that make sense?  Shouldn't we just use time_t?

Yeah, the code could be simplified now.  I'm also still not happy about
the question of whether it's safe to assume tv_sec is signed.  I think
the running state should be just finish_time, and then inside the
loop when we are about to wait, we could do
current_time = time(NULL);if (current_time >= finish_time){    // failure exit}remains.tv_sec = finish_time -
current_time;remains.tv_usec= 0;// pass &remains to select...
 
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c