Ticket #44074

select timeval inaccuracy

Date d'ouverture: 2022-03-11 14:17 Dernière mise à jour: 2022-03-11 20:15

Rapporteur:
Propriétaire:
(Aucun)
Type:
État:
Ouvert
Composant:
(Aucun)
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Aucun
Fichier:
Aucun
Vote
Score: 1
100.0% (1/1)
0.0% (0/1)

Détails

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 History (2/2 Histories)

2022-03-11 14:17 Updated by: mdblack98
  • New Ticket "select timeval inaccuracy" created
2022-03-11 20:15 Updated by: keith
Commentaire

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

Attachment File List

No attachments

Modifier

Please login to add comment to this ticket » Connexion