I want to write a string of data into a file on disk every 250ms
I need to insert an instruction in my C program such that after every 250ms (or, some Xms), I go get the data and write it to file… and keep doing this for a long period of time (hours, days).
What QNX function can I use to do this? Or, how is this best done in QNX 6.3 please?
Hi John, C newbie I see
It depends, there are multiple ways to do this. If the program is only doing that then
delay(250); // this will pause the program for 250ms
If the program is doing other thing and is block in a MsgReceive then you need to setup a timer to fire a pulse every 250ms.
Another way is to create a thread that does this.
If your 250ms cycle time is critical, ie. jitter is a problem, you might have to resort to attaching to the timer interrupt.
I am pretty sure this is what I need.
Yep, C newbe - and after all these years