ports/sysutils/isomaster/files/patch-bk__bkCache.c
Martin Wilke 01a5abbde4 - Update to 1.3.9
PR:		176528
Submitted by:	ports fury
2013-03-02 05:46:45 +00:00

27 lines
816 B
C

--- bk/bkCache.c.orig
+++ bk/bkCache.c
@@ -21,7 +21,7 @@
#include <string.h>
#include <stdio.h>
-#include <sys/timeb.h>
+#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -57,11 +57,11 @@
if(volInfo->writeProgressFunction != NULL)
{
- struct timeb timeNow;
- ftime(&timeNow);
+ struct timeval timeNow;
+ gettimeofday(&timeNow, NULL);
- if(timeNow.time - volInfo->lastTimeCalledProgress.time >= 1 ||
- timeNow.millitm - volInfo->lastTimeCalledProgress.millitm >= 100)
+ if(timeNow.tv_sec - volInfo->lastTimeCalledProgress.tv_sec >= 1 ||
+ timeNow.tv_usec/1000 - volInfo->lastTimeCalledProgress.tv_usec/1000 >= 100)
{
BkStatStruct statStruct;
double percentComplete;