Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

定时器BUG #19

Closed
tangkai1590 opened this issue Jan 9, 2019 · 3 comments
Closed

定时器BUG #19

tangkai1590 opened this issue Jan 9, 2019 · 3 comments

Comments

@tangkai1590
Copy link
Collaborator

tangkai1590 commented Jan 9, 2019

问题描述(question)

TimeThread定时器问题
1、反复测试定时器线程在Add单个定时器正常无误
2、多个定时器之后,定时器镜像m_TimerAssemble的索引逻辑错误,崩溃错误

具体如下:
当我配置1秒,2秒,3秒3个定时器,按照逻辑,最小公倍数为6秒,6秒为一个大周期,m_TimerAssemble 6秒内(一个公倍周期内)共有6个一级子定时执行镜像子集,在遍历时函数CTimerInfoList::Get_Next_Assemble()内部判断逻辑如下
if (m_nCurrTimerIndex == GetCurrTimerCount() - 1)
{
m_nCurrTimerIndex = 0;
}
else
{
m_nCurrTimerIndex++;
}
GetCurrTimerCount()取的是定时器数量,不是执行镜像集数量,因而前后不对应报错,修复后应该无误

操作系统环境(OS Environment):

WIN7

ACE版本环境(ACE Version):

6.4.0

PSS配置文件信息(PSS configure XML file content):

逻辑过程描述(Logic plugin describe):

问题描述(Question describe):

堆栈信息(Stack information):

期待结果(Expected results):

@freeeyes
Copy link
Owner

可否提供一下你的测试代码?谢谢。
我这里验证一下。

@freeeyes
Copy link
Owner

freeeyes commented Jan 11, 2019

感谢支持,找到问题了,已经修复,请测试一下。 @tangkai1590
PSS有使用方面的问题,请到 260862613 这个QQ群。
我一般都会在这个群里快速响应。

@tangkai1590
Copy link
Collaborator Author

更新后的版本已经解决

感谢支持,找到问题了,已经修复,请测试一下。 @tangkai1590
PSS有使用方面的问题,请到 260862613 这个QQ群。
我一般都会在这个群里快速响应。

新版定时器简单测试了下,问题已经解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants