• weixin_48148422's avatar
    fix issue #367 · 641ee305
    weixin_48148422 提交于
    the basic idea is to change clean up procedure to 2 steps,
    the 1st step only marks the time controller as to be cleaned up,
    the 2nd step executes in the timer thread and does the
    actual job to avoid race.
    
    I also change `pCtrl->ticks = rand() / pCtrl->maxTicks` to
    `pCtrl->ticks = rand() % pCtrl->maxTicks`, because I think
    this is a typo but not sure about this.
    641ee305
ttimer.c 17.5 KB