stream each do time pkt if time next_stop_time sleep next_stop_time Ti

1
2
3
4
5
6
7
8
@stream.each do |time, pkt|
if time > next_stop_time
sleep 1
next_stop_time = Time.now.to_f - start_time + offset
IzumiLogger.debug "< time:%.3f" % [next_stop_time]
end
@sock.write(pkt)
end