fix qt part schouldn't change before add algo)
This commit is contained in:
parent
e302dab670
commit
a86d9b1dfc
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
XFTimeout::XFTimeout(int id, int interval, interface::XFBehavior *pBehavior):
|
XFTimeout::XFTimeout(int id, int interval, interface::XFBehavior *pBehavior):
|
||||||
XFEvent(XFEventType::Timeout, id), interval_(interval) {
|
XFEvent(XFEventType::Timeout, id), interval_(interval) {
|
||||||
|
this->setRelTicks(this->getInterval());
|
||||||
setBehavior(pBehavior);
|
setBehavior(pBehavior);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,16 +34,6 @@ XFTimeoutManager::~XFTimeoutManager() {
|
|||||||
|
|
||||||
void XFTimeoutManager::addTimeout(XFTimeout *pNewTimeout) {
|
void XFTimeoutManager::addTimeout(XFTimeout *pNewTimeout) {
|
||||||
|
|
||||||
const int desireInterval = pNewTimeout->getInterval();
|
|
||||||
|
|
||||||
TimeoutList::iterator it;
|
|
||||||
do {
|
|
||||||
// TODO, super algorithm
|
|
||||||
} while (true);
|
|
||||||
|
|
||||||
int ticks = pNewTimeout->getInterval() / this->tickInterval_;
|
|
||||||
pNewTimeout->setRelTicks(ticks);
|
|
||||||
|
|
||||||
this->pMutex_->lock();
|
this->pMutex_->lock();
|
||||||
this->timeouts_.push_back(pNewTimeout);
|
this->timeouts_.push_back(pNewTimeout);
|
||||||
this->pMutex_->unlock();
|
this->pMutex_->unlock();
|
||||||
|
Reference in New Issue
Block a user