Media on URL

Berthold Stoeger bstoeger at mail.tuwien.ac.at
Sun Apr 3 07:47:49 PDT 2022


Hi Mark,

On Sonntag, 3. April 2022 15:03:55 CEST Mark Stiebel via subsurface wrote:

> Locally I changed sleep(1) to usleep(10000), which has made it a lot
> quicker - but before putting that in a PR wanted to check if there was a
> reason you added the 1 second sleep in there? (I believe usleep is also
> POSIX deprecated so we may want to avoid using it? I did find a
> usleep(1000000) in core/uemis-downloader.c though

If you look at core/btdiscovery.cpp or core/qt-ble.cpp, you will see that 
there is a QThread::msleep() function, which would probably be preferred here, 
since it should work on all platforms supported by Qt. The 1 s delay is 
clearly too long - feel free to post a PR.

I would prefer a non-polling way of doing this. It certainly can be done with 
futures, signals, etc. But then it is not a high priority for me.

Berthold




More information about the subsurface mailing list