@Timetolive is always calc. in event jps.registerEvent("UNIT_HEALTH_FREQUENT", function(unit)
I've moved the all stuff Timetodie in a separate file jpttd.lua

added in the timetodie frame the current spell and latency and for healers the lowestinraidstatus
and also the slider for jps.updateinterval

the latency is the time between  UNIT_SPELLCAST_SENT and  UNIT_SPELLCAST_START
I've found if the updateinterval x 2 is < latency , VT is casted twice
e.g. my latency at home is around 0.09 and 0.16 , if the updateinterval is set at 0.05 VT casted often twice
if the updateinterval is set to 0.1 VT is casted once.