$NetBSD: patch-ab,v 1.1.1.1 2009/01/18 17:39:37 wiz Exp $ --- zlibrary/core/src/unix/time/ZLUnixTime.cpp.orig 2008-03-22 13:00:31.000000000 +0000 +++ zlibrary/core/src/unix/time/ZLUnixTime.cpp @@ -17,21 +17,21 @@ * 02110-1301, USA. */ -#include +#include #include #include "ZLUnixTime.h" ZLTime ZLUnixTimeManager::currentTime() const { - struct timeb timeB; - ftime(&timeB); - return ZLTime(timeB.time, timeB.millitm); + struct timeval timeV; + gettimeofday(&timeV, NULL); + return ZLTime(timeV.tv_sec, 1000*timeV.tv_usec); } short ZLUnixTimeManager::hoursBySeconds(long seconds) const { - return localtime(&seconds)->tm_hour; + return localtime((time_t*)&seconds)->tm_hour; } short ZLUnixTimeManager::minutesBySeconds(long seconds) const { - return localtime(&seconds)->tm_min; + return localtime((time_t*)&seconds)->tm_min; }