I suspect there is some case where the msleep(40) is not always ensuring the behaviour we are after.
Perhaps playing with the msleep value might give some clues.
Phil.
Ok, thanks.
vnd said of the "critical value" (for S95):
I have found that the value 0xe0 which is the phase which causes that the camera waits for the next period instead of shooting immediately is written to register 0xC0F0713C. See the section HEAD Timers here http://magiclantern.wikia.com/wiki/Register_Map. It is also increased in low light live view.
For A1200 with a std_period = 209, this critical value must be less than 209.
If a count of 209 is equivalent to 33ms then a single count = 0.158ms
The minimum extended period count for A1200 is:
2x std period less (std period - curr count) = 2x209 - (209 - 200) = 409, equivalent to 64.58ms.
So long as msleep(40) is greater than an actual delay of 33ms it seems impossible the count at its expiry would be less than 209.
So long as msleep(40) is less than an actual delay of 64.58ms we are still in the extended count when control reverts to Canon which will see a count greater than the critical value and schedule a shot at the end of the subsequent std period.
If msleep(40) is less than an actual delay of 33ms it seems possible the count at its expiry could be less than the critical value - but, my understanding is, that would cause the shot to occur immediately. This would result in an outlier that was not exactly a single period removed from the other precision sync shots (in reality we do not see that result).
If msleep(40) is greater than an actual delay of 65.48ms ... i'm not yet sure sure what to say in those circumstances.
Is it known - is there a reasonable possibility that msleep(40) could, on occasion, be less than actual 33ms or greater than actual 65.48ms?
(will be offline mostly now for next few days)
Edit:
If msleep(40) is greater than an actual delay of 65.48ms - at expiry, we are likely in the early section of the std period following the extended period. It is therefore likely the count is less than the critical value & the shot will fire immediately. Since the shot is not taken at the end of a post sync period, the outlier will not be one std period (or multiple std periods) removed from the other precision sync shots.
Overall, the tentative conclusion is that the msleep(40) is not the origin of the precision sync outlier.