\r
//convert a name to an IP\r
//will return v4 or v6 depending on what seems favorable, or manual preference setting\r
-//on error the binip will have a family of 0 (other fiels are also currently\r
+//on error the binip will have a family of 0 (other fields are also currently\r
//zeroed out but may be used for further error information in future)\r
-//timeout is in miliseconds, it is ignored when using windows dns\r
+//timeout is in milliseconds, it is ignored when using windows dns\r
function forwardlookup(name:ansistring;timeout:integer):tbinip;\r
\r
//convert a name to a list of all IP's returned\r
var\r
temp:ttimeval;\r
begin\r
- gettimeofday(temp);\r
+ gettimemonotonic(temp);\r
result := ((temp.tv_usec div 1000) + (temp.tv_sec * 1000)) and tsmask;\r
{$endif}\r
end;\r
selecttimeout.tv_sec := 0;\r
selecttimeout.tv_usec := retryafter;\r
end;\r
- //find the highest of the used fd's\r
+ //find the highest of the used fds\r
b := 0;\r
for socknum := numsockused-1 downto 0 do if fd[socknum] > b then b := fd[socknum];\r
selectresult := select(b+1,@fds,nil,nil,@selecttimeout);\r