From: beware Date: Fri, 13 Aug 2021 06:34:52 +0000 (+0000) Subject: btime: also preserve -1 in unixtimeint, as in unixtimefloat X-Git-Url: http://www.lcore.org/git/lcore.git/commitdiff_plain/71f094bad8c68b2a3d096b436dc74cf4d9e2895a btime: also preserve -1 in unixtimeint, as in unixtimefloat git-svn-id: file:///svnroot/lcore/trunk@158 b1de8a11-f9be-4011-bde0-cc7ace90066a --- diff --git a/btime.pas b/btime.pas index a3428e8..8826a4d 100644 --- a/btime.pas +++ b/btime.pas @@ -255,7 +255,7 @@ begin gettimeofday(tv); sec := tv.tv_sec; {$ifndef cpu64} - if (sec < 0) then inc(sec,$100000000); //tv_sec is 32 bits + if (sec < -1) then inc(sec,$100000000); //tv_sec is 32 bits. allow -1 for invalid result {$endif} result := sec; end;