> I would like to have an event occur at a particular time and don't
> know how to do that.
>
>
> Example: at 7:00, 8:00 8:30 take a measurement then at 12:00 print the
> results.
There are several ways to do this. The key to the simplest one is to
take the target time and the current time and be able to subtract them
to get a delta in millisecs. I don't believe this will be hard, and
once you have a delta, you can use a wait ms node to put different loops
to sleep until they are supposed to wake up and run again.
A variation of this, that is easier to cancel is to make the timers use
an occurrence and a timeout. You will use is in reverse since the
normal case will be for the timeout to happen, and when you want to
cancel it, you will set th
e occurrence.
A third way of doing this is if the times are as sparse as you indicate
is to have a single loop that knows about the tasks -- it has an array
of times and task identifiers. Have the a loop sleep a bit, wake up and
check the current time against the array of tasks. If you keep the task
array sorted by time, then you only have to loop to the first one in the
future. You can then set your loop to sleep for something like 500ms,
or whatever you want the resolution to be.
Greg McKaskle