I have question I'm hoping will short-cut an investigation I'm doing into some inherited code. Essentially we have some real simple code which sets up an event with a timer and depending on certain things changes the timer during each loop. We are seeing a difference in behavior from when it was using 1.x libevent and 2.x.
We call event_set at the start of the code for 60 seconds, and then during each loop use event_add to set the timer to however many seconds from current time to get to the next minute. Its pretty dumb code and there are lots of things wrong with it but it has been working. We recently noticed that after upgrade to libevent 2.x as well as many other things it appears that changing the timout via event_add doesn't reset the current timer. I did some quick looking for bug reports and in the manuals and I couldnt find any indication that the libevent code had changed but I also couldnt confirm which is the correct behavior. 1.x - call event_add with a timeout and the next callback seems to be exactly timeout time from the time we called event_add 2.x - call event_add with a timeout and the next callback seems to be exactly timeout time from the beginning of the current loop, as if the timeout is being properly set but the current timer is not being reset when before it seemed to be. I will note we are still using event_set with 2.x even though its deprecated. So I was curious if anyone could say "duh" this is becuase you are using event_set, or this is because there is a known bug that was fixed in 2.x.x, or there was a change with this function somewhere along the line. At the very least I was hoping someone could confirm what the behavior we should be expecting when calling event_add. Sorry for the bother, but any advice would be much appreciated as this is inherited code it may take a while to unravel the original author's intent. -denis -- __________________________ Denis Alan Hainsworth de...@alumni.brandeis.edu *********************************************************************** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-users in the body.