	FUNCTION hmsd, In_time, seconds = seconds, hours = hours

;+	Converts time of string type "hh:mm:ss.ms" into seconds or hours (double).
;-

T_Sign=strmid(In_time, 0, 1) eq '-'

temp = In_time

ind = where(T_sign eq 0, count)
if count ne 0 then Temp(ind) = '+' + temp(ind)

ind = 0

Out_time = (double(strmid(Temp, 1, 2))*3600 + 	$
  		double(strmid(Temp, 4, 2))*60 		+	$
  		double(strmid(Temp, 7, 12))) 		* 	$
  			(1-2*T_sign)

if keyword_set(hours) then return, Out_time/3600d0 else return, Out_time

	end