cc_timer/cc_frm_clock: allow use of milisecond intervals

Should be easier and more flexible to handle without nano parameter,
some reworkes in other classes and thread handlings are required.
This commit is contained in:
2020-01-05 21:17:59 +01:00
parent 06aec40a25
commit b1f9c3c7f3
10 changed files with 233 additions and 239 deletions

View File

@@ -218,14 +218,14 @@ void CHintBox::enableTimeOutBar(bool enable)
if(timeout_pb){
timeout_pb->paint0();
timeout_pb->setValues(timeout_pb->getValue()+1, 100*timeout);
timeout_pb->setValues(timeout_pb->getValue()+1, 10*timeout);
}else{
timeout_pb = new CProgressBar();
timeout_pb->setType(CProgressBar::PB_TIMESCALE);
timeout_pb->setDimensionsAll(ccw_body->getRealXPos(), ccw_body->getRealYPos(), ccw_body->getWidth(), TIMEOUT_BAR_HEIGHT);
timeout_pb->setValues(0, 100*timeout);
timeout_pb->setValues(0, timeout);
if (!timeout_pb_timer) {
timeout_pb_timer = new CComponentsTimer(1, true);
timeout_pb_timer = new CComponentsTimer(100);
const string tn = cc_item_type.name + ":timeout_bar:";
timeout_pb_timer->setThreadName(tn);
}