C++ Guru, please help me....
登录 | 论坛导航 -> 华新鲜事 -> 技术の宅 | 本帖共有 3 楼,分 1 页, 当前显示第 1 页 : 本帖树形列表 : 刷新 : 返回上一页
<<始页  [1]  末页>>
作者:11:05pm (等级:2 - 初出茅庐,发帖:323) 发表:2004-06-09 12:50:32  楼主  关注此帖
C++ Guru, please help me....
I am doing a simulation using C++ (console application)
In the simulation, connection requests arrive following a poisson process.
I need generate connection requests and handle these requests.
Each time a request is generated, the request will be passed to a function for handling.


My problem is:
If a request was generated at time T1 , how to trigger a function at T1+T2 ? (T2 is a time instance and is poisson distributed).

"time" function can be used to get the current system time, then how to trigger a function at another time instance? What key C++ functions could be used?


I know how to handle this problem in WFC and Platform SDK since WM_TIMER messege is available.



Thank you very much!!!
如果,相识是缘分
那么,分离是不是天注定
人与人之间,看似很简单,却也不尽然
爱上你,只要一瞬间,遗忘你,却要用尽一生的时光
如果不能陪你到永远,我只能隔着黑夜的寂寥默默想你
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:hula (等级:7 - 出类拔萃,发帖:3682) 发表:2004-06-09 18:07:22  2楼 评分:
it's nothing with c++...
u can read any simulation book which will include pseudocode for sigle process simulation. basic idea is generally insert the generated event in queue according to timestamp and process the event on the queue one by one
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:11:05pm (等级:2 - 初出茅庐,发帖:323) 发表:2004-06-09 21:58:22  3楼
it's nothing with c++...u can read any simulation book which will include pseudocode for sigle process simulation. basic idea is generally insert the generated event in queue according to timestamp and process the event on the queue one by one
Yeah!我也突然想起来了。谢谢哈。
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
论坛导航 -> 华新鲜事 -> 技术の宅 | 返回上一页 | 本主题共有 3 篇文章,分 1 页, 当前显示第 1 页 | 回到顶部
<<始页  [1]  末页>>

请登录后回复:帐号   密码