<br><div class="gmail_quote">2012/9/27  <span dir="ltr"><<a href="mailto:VaclavKrpec@eaton.com" target="_blank">VaclavKrpec@eaton.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everybody,<br></blockquote><div><br>Hi Vaclav<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm working on the "Use difftime for time comparison" bug (#313634).<br>
Charles directed me to the other one "Use monotonic clock for monitoring"<br>
attended to by Baruch; I believe that's very good idea, however I'd use a bit<br>
more encapsulated & general approach:<br>
<br>
1/ I'd create an opaque timer type and its get/set/cmp/inc/dec etc interface<br>
under common<br>
2/ implementation of the interface would use the monotonic clock if available<br>
(the clock_*time on Linux, potentially other monotonic clock impl. on other<br>
systems) and time_t as a fallback<br>
3/ when implemented, use of the timer shall be spread throughout the code,<br>
replacing direct use of time_t<br>
<br>
What do you think?<br>
I'm also a bit reluptant to do such a change in scope of the bugfix; I'd create<br>
a new feature req. for that, OK?<br>
<br>
Any comments/ suggestions welcome,<br></blockquote><div><br>for now, Baruch's implementation seems simple and good enough.<br>your approach is nice (OO) but I'd like to retain this a bit more, and map it with a more general OO/c++ discussions, later...<br>
there are still some "time()" occurences left, here and there (clients/upsmon.c for ex.).<br><br>I'd however like to see how it compiles, and behaves on our buildslaves.<br>so working on your branch, and forcing compilation is the way to go.<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
P.S: already managed to post this from another address by mistake, so please<br>
just discard the previous e-mail (or this one, depending on which you've read).<br></blockquote><div><br>I added this address to the accepted senders, as for other team members...<br><br>cheers,<br>Arnaud<br>
</div></div>