Ticket #44074

select timeval inaccuracy

Eröffnet am: 2022-03-11 14:17 Letztes Update: 2022-03-11 20:15

Auswertung:
Verantwortlicher:
(Keine)
Typ:
Status:
Offen
Komponente:
(Keine)
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Keine
Datei:
Keine
Vote
Score: 1
100.0% (1/1)
0.0% (0/1)

Details

I'm the maintainer of Hamlib. I think this is recent behavior Even thought the timeval for the select statement is 1 second exactly it ends up being almost 2 seconds. You can see from the timing on the debug messages that the 2022-03-10T23:15:03.068356-0600: ../../src/src/iofunc.c(721) trace 2022-03-10T23:15:03.068356-0600: port_wait_for_data_direct: sec=1, usec=0 2022-03-10T23:15:05.021620-0600: port_wait_for_data_direct: after port_select 2022-03-10T23:15:05.021620-0600: read_string_generic(): Timed out 1.953 seconds after 0 chars, direct=1

MINGW64_NT-10.0-22000 DESKTOP-VP5ISPC 3.3.3-341.x86_64 2022-01-18 13:00 UTC x86_64 Msys

static int port_wait_for_data_direct(hamlib_port_t *p) {

fd_set rfds, efds; int fd = p->fd; struct timeval tv, tv_timeout; int result;
TRACE; tv_timeout.tv_sec = p->timeout / 1000; tv_timeout.tv_usec = (p->timeout % 1000) * 1000; rig_debug(RIG_DEBUG_VERBOSE, "%s: sec=%ld, usec=%ld\n", func, tv_timeout.tv_sec, tv_timeout.tv_usec);
tv = tv_timeout; /* select may have updated it */
FD_ZERO(&rfds); FD_SET(fd, &rfds); efds = rfds;
result = port_select(p, fd + 1, &rfds, NULL, &efds, &tv, 1); rig_debug(RIG_DEBUG_VERBOSE, "%s: after port_select\n", func);

Ticket-Verlauf (2/2 Historien)

2022-03-11 14:17 Aktualisiert von: mdblack98
  • New Ticket "select timeval inaccuracy" created
2022-03-11 20:15 Aktualisiert von: keith
Kommentar

I'm sorry, but you simply haven't provided (anywhere near) enough information, to allow us to effectively help with this. Please:

Dateianhangliste

Keine Anhänge

Bearbeiten

Please login to add comment to this ticket » Anmelden