On Wed, 4 Dec 2019, Sean Burford via curl-library wrote:

Reading the man page <https://curl.haxx.se/libcurl/c/CURLMOPT_TIMERFUNCTION.html>, it looks like calls to the timer function request a single shot timer. Your description makes it sound like you set up a periodic timer that fires every timeout_ms milliseconds. It shouldn't be necessary for curl to provide a -1 cancellation because the timer was meant to be a single shot, it's only specified to fire once.

That's exactly right. The man page calls it "a non-repeating timer". A timeout value 0 then means fire ONCE right away. -1 means cancel the current existing timer and all other (positive) values means fire off a single-time timer in this many milliseconds.

The example on the man page may be a source of confusion.

Yah, I'm not overly happy with that one. If someone can come up with a nicer and cleaner example to use there, I'm interested!

--

 / daniel.haxx.se | Get the best commercial curl support there is - from me
                  | Private help, bug fixes, support, ports, new features
                  | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to