cxCalendar | cxCalendar 是基于 jQuery 的日期选择器插件,支持日期、时间、月份、年份等多种类型。 | Frontend Framework library
kandi X-RAY | cxCalendar Summary
kandi X-RAY | cxCalendar Summary
cxCalendar 是基于 jQuery 的日期选择器插件,支持日期、时间、月份、年份等多种类型。. 若从 1.x 版本升级迁移,请查看 cxCalendar v2.0.0 说明及升级适配.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cxCalendar
cxCalendar Key Features
cxCalendar Examples and Code Snippets
Community Discussions
Trending Discussions on cxCalendar
QUESTION
I have a small problem with a waitable timer object when I use with absolute time and waitformultipleobjects ().
Once the timer gets signaled I need to reset the object, and the only way I can find is by using setwaitabletimer again with a unrealistic due time in the future. That'll keep the timer active in the OS waketimers for no reason at all. I need to keep the handle because I need to reactivate the timer in some situations and I use the timer object in the waitformultipleobjects array, so closing the FWaitTimer handle will not be good.
Do I understand this correct or is there a better way to do this?
My full code looks like this, please disregard the other waitfor objects, it's only the FWaitTimer object.
...ANSWER
Answered 2019-Jun-04 at 19:47Quote from the documentation (emphasis mine):
The thread calls the SetWaitableTimer function to activate the timer. Note the use of the following parameters for SetWaitableTimer: Use the lpDueTime parameter to specify the time at which the timer is to be set to the signaled state. When a manual-reset timer is set to the signaled state, it remains in this state until SetWaitableTimer establishes a new due time. When a synchronization timer is set to the signaled state, it remains in this state until a thread completes a wait operation on the timer object.
So the only way is to call SetWaitableTimer
again to reset the signaled state of the timer.
There are 2 ways to solve your problem, use the current hack but add CancelWaitableTimer()
after SetWaitableTimer()
to cancel the timer (it's state will stay unsignaled)
A better solution is not to wait for the timer when it is not in use, Implement as @RbMm suggests:
put the FWaitTimer at the 2(last) place in array - EventArr[2] := FWaitTimer and pass 3 or 2 as first argument to WaitForMultipleObjects
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cxCalendar
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page