On 10 September 2018 at 08:05, Dirk Hohndel <d...@hohndel.org> wrote: > > This should be so simple. libtfdi is available in MXE, so just build against > it, right? > Except this: > > static dc_status_t serial_ftdi_sleep (void *io, unsigned int timeout) > { > ftdi_serial_t *device = io; > > if (device == NULL) > return DC_STATUS_INVALIDARGS; > > INFO (device->context, "Sleep: value=%u", timeout); > > struct timespec ts; > ts.tv_sec = (timeout / 1000); > ts.tv_nsec = (timeout % 1000) * 1000000; > > while (nanosleep (&ts, &ts) != 0) { > if (errno != EINTR ) { > SYSERROR (device->context, errno); > return DC_STATUS_IO; > } > } > > return DC_STATUS_SUCCESS; > } > > Turns out Windows doesn't have nanosleep. And I can't seem to find a > function with comparable semantic, unless I use the one in the pthread > library that is provided by MinGW which is not what we want to do. > So the question becomes how to represent this with something that gives us > the same semantic / functionality. >
proposed patch: https://github.com/Subsurface-divelog/subsurface/pull/1668 lubomir -- _______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface