The value returned os.time the integer number of seconds since Jan 1, 1970 (in the cameras timezone). It's not really rounded or truncated form anything.
Thanks. (my note e.g: 20 > X ≥ 19 -> os.time(@X) = 19)
i.e. you should not assume that time increments by every time get_tick_count() passes a multiple of 1000.
fyi, function
sd_write_finish() only uses get_tick_count() to calculate a timeout.