Sync pcs


I have to sync different processes on two pcs in a wlan. what is the best way to do this ?
Can i sync the clocks of the pcs (for the sync-process, i could connect the pcs with a cable) ?
or can i use pulses/messages for this ? What’s the fastest way to send a pulse by network ?
i need an accuracy of about 10 ms.

Hope someone can help me, thanks.

You could use NTP (Network time protocol). Or if all you need is 10ms a pulse going over the network should be ok.

I will try NTP. Is there an implementation for QNX ? I’m using version 6.3.0. Where can I get it from ?

I’m not sure if it’s include in 6.3 or not. If not it is probably on the 3rd party CD. If not i guess it shouldn’t be too hard to port. I beleive some people on this forum have done it.

Ok, NTP works. Thank you. I can sync the clocks of the two pcs now.
Then, one process has to send the beginning time of the synced action to the other processes on the other and on the same pc. What’s the best (fastest) way to do this ?
After I have the same beginning time on every pc, I set up two identical timers on every pc and sync the different processes by pulses. Is this the most effective possibility, or is there a better one ?

Fastest way is a pulse, but it can only carry a 32 bit value so depending on the precision of the time you required you might have to send a message (which will still be very fast)

AS for the timer thing, it can be tricky. You can setup a timer to trigger at specific time, but then I’m not sure if ntp can have the time jump ahead and skip over the time set by the timer. The chances of this happening are very very low but it can still be happend. I couldn’t find in the doc (Hey Steve reading this) a description of the behavior if the time is modified.

I have a synced timer on every pc now. How can I share a timer between multiple processes ? I’ve searched in the docs, but I can’t find a good example for ipc :frowning: