X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/968c333d05db5d5ecf3599f8e304c67e64f21159..eca2c8e0a8aad79c7dc7738346d265f973428995:/dnssync.pas?ds=sidebyside diff --git a/dnssync.pas b/dnssync.pas index 7dedcca..84caf9a 100644 --- a/dnssync.pas +++ b/dnssync.pas @@ -31,9 +31,9 @@ interface //convert a name to an IP //will return v4 or v6 depending on what seems favorable, or manual preference setting -//on error the binip will have a family of 0 (other fiels are also currently +//on error the binip will have a family of 0 (other fields are also currently //zeroed out but may be used for further error information in future) -//timeout is in miliseconds, it is ignored when using windows dns +//timeout is in milliseconds, it is ignored when using windows dns function forwardlookup(name:ansistring;timeout:integer):tbinip; //convert a name to a list of all IP's returned @@ -94,7 +94,7 @@ begin var temp:ttimeval; begin - gettimeofday(temp); + gettimemonotonic(temp); result := ((temp.tv_usec div 1000) + (temp.tv_sec * 1000)) and tsmask; {$endif} end; @@ -256,7 +256,7 @@ begin selecttimeout.tv_sec := 0; selecttimeout.tv_usec := retryafter; end; - //find the highest of the used fd's + //find the highest of the used fds b := 0; for socknum := numsockused-1 downto 0 do if fd[socknum] > b then b := fd[socknum]; selectresult := select(b+1,@fds,nil,nil,@selecttimeout);