| 505 | } |
| 506 | |
| 507 | bool simpleCallBackSetProgress( float p ) |
| 508 | { |
| 509 | auto& instance = ProgressBarImpl::instance(); |
| 510 | |
| 511 | // set instance.allowCancel_ = false but write in memory only if it was true |
| 512 | bool expected = true; |
| 513 | instance.allowCancel_.compare_exchange_strong( expected, false, std::memory_order_relaxed ); |
| 514 | |
| 515 | setProgress( ( p + float( instance.currentTask_ - 1 ) ) / instance.taskCount_ ); |
| 516 | return true; // no cancel |
| 517 | } |
| 518 | |
| 519 | void printTimingTree( double minTimeSec ) |
| 520 | { |
nothing calls this directly
no test coverage detected