Force an interval expiration

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
Tim
Posts: 6
Joined: 27 February 2010, 11:50 AM

Force an interval expiration

Post by Tim »

I am using the the command "SetInterval(1)" to force an interval expiration on a task using WaitForInterval. However, this causes a delay of up to 1 RTC tick before the task resumes. Is there a way I can force an immediate interval expiration?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Force an interval expiration

Post by dkinzer »

Tim wrote:Is there a way I can force an immediate interval expiration?
I suspect that ResumeTask() will serve your purpose. You'll have to pass the task stack of the task that is awaiting the interval expiration (unless it is the Main() task).
- Don Kinzer
Tim
Posts: 6
Joined: 27 February 2010, 11:50 AM

Post by Tim »

Aha! Thats what I wanted. Not sure how I missed that function. I'm still new to working with tasks.

Thank you much.
Post Reply