Works fine but the timer keeps cutting off in my rather big and complex app.... oh well I'll have to figure that out then.
Still perhaps useful to some.
You send it a number of milliseconds like 5000 for 5 seconds and it will call that timer t5000 then 5 seconds after it'll activate it and remove it from the queue.
You could send unique numbers like 5432 etc. to determine exactly which timer is being sent back to you.
I plan to use it in my app BTInterface so that the user can have their micro controller send a time like t10000 then after the appropriate time (ten seconds in this instance) BTInterface will send the string t10000 back again which the micro controller program will be looking out for to know when its time's up.
Just need to get it working with BTInterface
This first draft is very basic and not at all robust.
Perhaps someone can suggest improvements?
Incidentally, fun things happen if you accidentally use an Int instead of a Long so look out for that one if you have weird Timer issues.
Still perhaps useful to some.
You send it a number of milliseconds like 5000 for 5 seconds and it will call that timer t5000 then 5 seconds after it'll activate it and remove it from the queue.
You could send unique numbers like 5432 etc. to determine exactly which timer is being sent back to you.
I plan to use it in my app BTInterface so that the user can have their micro controller send a time like t10000 then after the appropriate time (ten seconds in this instance) BTInterface will send the string t10000 back again which the micro controller program will be looking out for to know when its time's up.
Just need to get it working with BTInterface
This first draft is very basic and not at all robust.
Perhaps someone can suggest improvements?
Incidentally, fun things happen if you accidentally use an Int instead of a Long so look out for that one if you have weird Timer issues.
Attachments
Last edited: