ruby {
code => "
pubtime_new = event.get('[pubtime]').to_i * 1000
event.set('pubtime_new',pubtime_new) >>>> If I don't register pubtime_new then below can't get the value of pubtime_new.
timeset = event.get('[timestamp_us]').to_i - event.get('[pubtime_new]').to_i
event.set('timeset',timeset)
event.set('delay_time_us', event.get('[pubtime]').to_i - event.get('[device_timestamp]').to_i)
event.set('pub_subtime_us', timeset + event.get('[transaction_duration_us]').to_i )
"
}
Maybe I don't understand it correctly, and I don't know much about ruby, I just want to ask if there are other ways to directly refer to the new variable.