The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: xPL Timer app needed?




Hi Steve,

> One thing that is missing in xPL is some method of having a dynamic
delay.
> e.g. I want this to happen 10 minutes after I receive this trigger. 
At
> least I can't think of a way to achieve this, correct me if I'm wrong
> please.

Assuming I understand you correctly, I can think of 2 ways of achieving a
dynamic delay:

1. Use the Pause action in the determinator to insert a pause before your
actions are executed.
- This is good for short delays, as it keeps the determinator thread alive,
but asleep, for the specified delay.
- This is also useful for accurate delays, as it can be specified in
milliseconds.
- Not so good for long delays (e.g. more than a few minutes) as you don't
want to leave the determinator thread running for too long
- You can't cancel a determinator once it's running if you wanted to.

2. Use the Suspend action.
- This is ideal for longer delays, as it kills the determinator thread, and
resumes it at the specified time.
What actually happens is that xPLHal creates a single (one-shot) event to
occur whenever the determinator should continue executing.
When this event fires, xPLHal continues executing the determinator where it
left off before it was suspended.

HTH,

John




xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.