Background:
My sx150is has a real aperture (stepper motor? presumably with non-trivial time between realising each value) - not all values are available at all zoom_steps.
I designed an autoit gui listview control to enable single click selection of a particular zoom_step/aperture value pair (if anyone is interested the code is in this thread
https://www.autoitscript.com/forum/topic/167766-listview-select-subitems/?do=findComment&comment=1246546).
A quick(&dirty), on the fly, set_zoom function addition to multicam.lua works fine when sending the listview zoom value...but i'm not sure whether, at this point, to bother setting the Canon Aperture [using a get_user_av_id / post_levent_to_ui("RotateJogDialLeft(/Right)",1) addition] or simply add a set_av96 override to it.
Having, for the first time, just looked at multicam.lua function cmds.shoot_hook_sync() and read the start of the script shooting hooks thread (
http://chdk.setepontos.com/index.php?topic=11081.msg108530#msg108530), i'm not really sure if the set_av96 override I propose above would occur after the hook_shoot.continue() line in the function (if so, presumably that override time could vary a lot between cameras and very negatively impact ptp sync?)
In summary, if I set an aperture override, say by an on the fly function addition to multicam.lua (or directly add to camera side script code) - when/where is the aperture override applied if subsequently shooting using cmds.shoot_hook_sync() ?
Other,
hadn't really expected to be thinking of implementing a ptp based trigger so neither do I particularly understand how the tonumber(mc.args)) of wait_tick(tonumber(mc.args)) ends up the correct number on the different cams...a brief overview of pctime / cam tick logic would help me read the relevant multicam functions.
Haven't got around to looking at IUP yet

fmi:
http://chdk.setepontos.com/index.php?topic=8769.msg107995#msg107995The highest resolution clock available to CHDK lua is get_tick_count, which has a precision (but not necessarily accuracy) of 10 ms. os.time only gives you seconds.
As I posted earlier, the multicam.lua chdkptp module attempts to do something a bit like what you described in http://chdk.setepontos.com/index.php?topic=8769.msg107985#msg107985 using get_tick_count and wait loops in lua.
If a higher precision clock were available, you'd probably want to make a script command that let you schedule a shot to begin at a certain precise time using the remote hook, rather than doing the wait in Lua. The stuff in this thread http://chdk.setepontos.com/index.php?topic=8312.100 might be helpful. I suspect that even if you get the high precision clock, synchronizing it with a similar level of precision of USB would still be tricky.