diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2024-10-13 14:38:25 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2024-10-13 14:54:28 +0200 |
commit | 4b57a188fbd4ac2439f2a141475222c8d68d67ea (patch) | |
tree | 7bdbfd9d9f7a5be3a66a6407bd2b1e294b9f4aa6 | |
parent | 642140ab85ce55b000b67e7c659e1dab0b6542cc (diff) | |
download | tde-ebook-reader-r14.1.x.tar.gz tde-ebook-reader-r14.1.x.zip |
This solves FTBS on systems where ftime is already removed.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 88d74dedf45e6f7f2d20b60930fbc1353d60d94c)
-rw-r--r-- | zlibrary/core/src/unix/time/ZLUnixTime.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zlibrary/core/src/unix/time/ZLUnixTime.cpp b/zlibrary/core/src/unix/time/ZLUnixTime.cpp index dd23ae5..959fde2 100644 --- a/zlibrary/core/src/unix/time/ZLUnixTime.cpp +++ b/zlibrary/core/src/unix/time/ZLUnixTime.cpp @@ -17,7 +17,7 @@ * 02110-1301, USA. */ -#include <sys/timeb.h> +#include <sys/time.h> #include <time.h> #include <ZLTime.h> @@ -25,9 +25,9 @@ #include "ZLUnixTime.h" ZLTime ZLUnixTimeManager::currentTime() const { - struct timeb timeB; - ftime(&timeB); - return ZLTime((long)timeB.time, timeB.millitm); + struct timeval timeB; + gettimeofday(&timeB,NULL); + return ZLTime((long)timeB.tv_sec, timeB.tv_usec/1000); } short ZLUnixTimeManager::hoursBySeconds(long seconds) const { |