1

Topic: timertt-1.2.0

We updated the superficial library for operation with the postponed and periodic timers (wallclock-timers are not supported basically). In this version two important features are added: 1. Earlier action for the timer always had type std:: function <void ()> that was floppy and convenient, but had the latent overhead charge connected with std:: function (as a matter of fact, std:: function here appeared as the clever pointer for lambdas and functors). If it would be desirable to get rid of these latent expenditures, it is possible to set own type. For example: class operation_canceler {operation_manager and manager _; operation_id id _; public: operation_canceler (operation_manager and manager, operation_id id): manager _ {manager}, id _ {id} {} void operator () () const noexcept {manager_. cancel (id _);} };...//Define type of timer thread which was use operation_canceler as//a timer action type. using my_timer_wheel_thread = timertt:: timer_wheel_thread_template <operation_canceler, timertt:: default_error_logger, timertt:: default_actor_exception_handler>;...//Create and use this timer thread. my_timer_wheel_thread tt; tt.start ();... tt.activate (std:: chrono:: milliseconds (750), operation_canceler {manager, current_id}); the Type should be Moveable and MoveConstructible. Accordingly, now when there is an object-timer, the place for the user object-funktora there is reserved. And at timer activation the user functor  in this reserved piece of storage. Thereby does not happen additional  storages (as it is from time to time can happen with std:: function). 2. Now the user himself can create objects-timers on a stack or in other objects. Earlier objects-timers formed is exceptional dynamic. Now it is possible to avoid additional , but the user now itself should track that the timer did not finish the life ahead of time. For example: void do_something_complex () {timertt:: default_timer_wheel_thread tt; tt.start ();... timertt::default_timer_wheel_thread::scoped_timer_object timer;//Activate tt.activate (timer, std:: chrono:: milliseconds (250)...);...//Timer can be deactivated in usual way. tt.deactivate (timer);... tt.shutdown_and_join ();} However, in this version we broke compatibility at source code level a little. Therefore version number 1.2.0, instead of 1.1.4. To steam of words about an origin and library assignment. Once we long and with pleasure used the big library ACE. Including local timers (which implementation was sound and advanced). But in process of passage to a C ++ 11 we gradually refused from ACE and once it appeared that from ACE timers are necessary to us only. Not to drag distribution kit ACE only for the sake of timers, we made superficial header-only  which is based only on regular possibilities of a C ++ 11. At us timertt in operation a year three. Problems it is noted. Works stablly, can support a fair amount of timers (ten and hundred millions). Implements three different  the mechanism: wheel, heap and list, each of which is good in the situation. Prior versions timertt could work and with compilers which not so well supported a C ++ 11 (in particular, VS2013). Since 1.2.0 we at such compilers we do not look back any more. Something is necessary more or less normal (gcc 4.8-7.2, clang 3.5-5.0, vs2015/2017). However, the main part of the code for the present under all possibilities of a C ++ (like noexcept and constexpr there where it is reasonable) is not adapted yet. We make it in due course. As we mark that new features have been only just added. For certain something can be refined and made more conveniently. We as make it in due course and if there will be positive  it happens faster. Archives with library source codes can be found here. Source codes live here. The documentation here. The license: BSD-3-CLAUSE. Disclaimer: if you already use timers which give such tools, as ACE, asio, libuv, Qt and so forth hardly to you it is necessary timertt. And here if you needed to work in the program with the postponed or periodic actions, and to drag in project ACE/asio/libuv which there was not... Or if at you millions such actions here then timertt to you can help. In general, for the majority is exemplary it is unnecessary. But here it was required to us, can to whom else it is useful.

2

Re: timertt-1.2.0

Hello, so5team, you wrote: S> We updated the superficial library for operation with the postponed and periodic timers (wallclock-timers are not supported basically). In this version two important features are added: Tell please what version supports MSVS 2010, is more exact toolset 100xp? P.S. Yes, alas, it is necessary to support still heaps old  written in shaggy years.

3

Re: timertt-1.2.0

Hello, Dead Down, you wrote: S>> We updated the superficial library for operation with the postponed and periodic timers (wallclock-timers are not supported basically). In this version two important features are added: > Tell please what version supports MSVS 2010, is more exact toolset 100xp? > P.S. Yes, alas, it is necessary to support still heaps old  written in shaggy years. Possibly, any. Minimum MSVS on which we  earlier, was MSVS2013 (it VC ++ 12.0). Just tried VC ++ 11.0, it does not take even timertt-1.0. Unless it is possible to try any of MinGW, gcc-4.8 normally supports timertt 1.0-1.2.