$OpenBSD: patch-bk_bkCache_c,v 1.1 2013/12/03 14:21:37 giovanni Exp $
--- bk/bkCache.c.orig	Mon Dec  3 17:56:48 2007
+++ bk/bkCache.c	Fri Nov 29 09:07:39 2013
@@ -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 @@ int wcWrite(VolInfo* volInfo, const char* block, size_
     
     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 - volInfo->lastTimeCalledProgress.tv_usec >= 100000)
         {
             BkStatStruct statStruct;
             double percentComplete;
