# File lib/rufus/sc/rtime.rb, line 104 def Rufus.parse_time_string (string) string = string.strip index = -1 result = 0.0 number = '' loop do index = index + 1 if index >= string.length result = result + (Float(number) / 1000.0) if number.length > 0 break end c = string[index, 1] if (c >= '0' and c <= '9') number = number + c next end value = Integer(number) number = '' multiplier = DURATIONS[c] raise "unknown time char '#{c}'" unless multiplier result = result + (value * multiplier) end result end