If you can clarify what didn't work and how it failed, I might be able to help
it is not that important since it works with sys.gettimeofday()
but if you replace currentime in this code with os.time and secs with any interval (in seconds) it will give a one digit fraction in the result, if you use sys.gettimeofday() it doesn't.......in theory there is no difference between theory and real life, in real life there is.
next_shot_moment=math.floor((currenttime+secs)/secs)*secs
This exposes the (confusingly named) gettimeofday libc function. It returns two integers: A timestamp similar to os.time, followed by the microseconds fraction.
obviously doesn't do what it says on the tin
On Windows and Linux, os.time and gettimeofday work in unix time, more or less.
So you if you want to know how many seconds you are into the day, you could get the unix time value for 00:00 in the current day and subtract that from the current time.
UTC and UNIX time are close enough for my purpose, it would be a shame though if i would win the lottery in an UTC leap second while i live in UNIX time
however, getting the unix timevalue for 00:00, i would not know how to to that other than with the 86400 division i posted hereabove and i currently use.
You can use *t or !*t with os.date to get a table representing the current date+time (or a specified unix time) in local or UTC time respectively. You can get a timestamp from a similarly constructed table (in local time only) using os.date.
use !return os.date('*t') to see the field names
chdku.ts_get_offset returns the local timezone offset from UTC in seconds.
on my list: if i can improve the calculation, but since it works for now i am going forward.
now i finally can read and understand part of multicam i am eager to add the functionality i need or want
since the interval was a need for my use and more or less works, i will dive into a want.
because it's hard to check things on the fly and i did not find this in the existing code. next thing on my mind is making a csv log of the terminal output i get from multicam, either on the pc or on each seperate cam....i'm leaning towards on the cam, because if file names, cam names and timestamps are the same on both cams seperating data on the pc might pose a challenge to my skills or mind.