• Kirill Smelkov's avatar
    time: Rearrange code a bit · 82c55254
    Kirill Smelkov authored
    In the next patch we will add reworked implementation of timers - that
    will no longer use dumb approach to work via threads - and in that
    implementation it will make sense to regroup the organization of code a
    bit for better clarity. Prepare for that:
    
    - move Timer.reset to stay in between _new_timer and stop. This will be
      handy because Timer.reset will be interaction with both even loop
      (coming right before new) and stop.
    
    - move new_timer to the place where we commonly keep wrapper
      "create-timer or ticker" routines to improve signal/noise ration for
      the place where actual interaction in between code parts happen.
    
    For the reference my general approach to order things is to go from high
    level to down and group things by interaction along the way. This way
    things turns out to be the most easily readable and understandable.
    
    /proposed-for-review-on !26
    82c55254
time.cpp 4.54 KB