Simple question about TFPHTTPClient.IOTimeout lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- GAN · 2020-01-14 21:00 The time unit is milliseconds? ---------------------------------------------------------------------- lucamar · 2020-01-15 11:23 It's set in the socket as: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i FIOTimeout:=(time.tv_sec*1000)+(time.tv_usec div 1000); so yes, it seems IOTimeOut is millliseconds. ---------------------------------------------------------------------- GAN · 2020-01-15 20:22 Hi @lucamar, yes I saw this formula and then posted the question, because it is not clear for me Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (time.tv_sec*1000) appears to be seconds. ---------------------------------------------------------------------- Thaddy · 2020-01-15 20:43 Well: http://man7.org/linux/man-pages/man2/setitimer.2.html https://en.cppreference.com/w/c/chrono/timespec https://www.gnu.org/software/libc/manual/html_node/Elapsed-Time.html Why do people not Read The Fine    Manuals.... Resolution is either seconds or nanoseconds. ---------------------------------------------------------------------- GAN · 2020-01-15 22:40 @Thaddy thanks for the link, but they must be milliseconds because with values less than 200 (approx.) I get 90% errors and with value of 1000/1500 works fine. ---------------------------------------------------------------------- lucamar · 2020-01-16 13:02 Quote from: GAN on January 15, 2020, 09:22:10 pmHi @lucamar, yes I saw this formula and then posted the question, because it is not clear for me Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (time.tv_sec*1000) appears to be seconds. Of course: time.tv_sec is seconds, which multiplied by 1000 give milliseconds; time.tv.usec are microseconds which divided by 1000 give, again, milliseconds. The links posted by Thaddy are (somewhat) useful to know why a time struct has to be used: for the system call that implements the timer. But Thaddy, note: Quote from: Thaddy on January 15, 2020, 09:43:18 pmResolution is either seconds or nanoseconds. That is correct when you (have to) use the struct timespec, but the structure used here is timeval, which has only seconds and microseconds. HTH! ---------------------------------------------------------------------- GAN · 2020-01-16 21:49 Thanks @lucamar and @Thaddy.