Use gettimeofday() instead of ftime(). Bug #300482.

merge-requests/1/head
Henning Geinitz 2004-01-29 22:58:17 +00:00
rodzic 84b7db977d
commit 80ae15abed
2 zmienionych plików z 12 dodań i 4 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2004-01-29 Henning Meier-Geinitz <henning@meier-geinitz.de>
* backend/mustek_scsi_pp.c: Use gettimeofday() instead of
ftime(). Bug #300482.
2004-01-21 Gerhard Jaeger <gerhard@gjaeger.de>
* backend/test.c: reader_process terminates now, when running as
thread.

Wyświetl plik

@ -57,10 +57,11 @@
#include <unistd.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include "../include/sane/sane.h"
#include "../include/sane/sanei.h"
#include "../include/sane/saneopts.h"
@ -81,11 +82,13 @@ static int mustek_scsi_pp_timeout = 5000;
static int
mustek_scsi_pp_get_time ()
{
struct timeb tp;
struct timeval tv;
int retval;
ftime (&tp);
retval = tp.time * 1000 + tp.millitm;
gettimeofday (&tv, 0);
retval = tv.tv_sec * 1000 + tv.tv_usec / 1000;
return retval;
}