Updated code to test gettimeofday() ...

Поиск
Список
Период
Сортировка
От Marc G. Fournier
Тема Updated code to test gettimeofday() ...
Дата
Msg-id 20031129191430.A99096@ganymede.hub.org
обсуждение исходный текст
Список pgsql-hackers
Just as an FYI, there are continuing talks on FreeBSD's mailng lists about
this issue, in hopes of getting it corrected ... if anyone here is using
FreeBSD, you'll want to check out the -current mailing list, where
discussions are taking place ...

Update code for testing is included here, though, with which
Poul-Henning(sp?) is requesting problem reports issued against ...

#include <stdio.h>
#include <sys/time.h>

int
main()
{       struct timeval prevtime;       struct timeval curtime;       double last, now;
       gettimeofday(&prevtime, NULL);       last = prevtime.tv_sec + prevtime.tv_usec * 1e-6;
       for (;;)       {               gettimeofday(&curtime, NULL);               now = curtime.tv_sec +
curtime.tv_usec* 1e-6;
 
               if (now < last) {                       printf("%f %f %d.%06d %d.%06d\n", now, last,
     curtime.tv_sec, curtime.tv_usec,                           prevtime.tv_sec, prevtime.tv_usec);               }
         last = now;               prevtime = curtime;       }
 
       return 0;
}


----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664


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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: $Id$ -> $PostgreSQL$ Change
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Materialized views proposal