How to find date Difference in AWK/GAWK with millisecond precision

Hi,
I have a log file that has the date in this format "2006-05-30_13:14:04,256". I need to find the time difference between two log entries in milliseconds.
How to achieve this in AWK/GAWK script? :confused:

You can do this with the timeval struct in C. I don't know of a way to do this in awk - especially if you have values that span minutes or hours.

Step1-->"2006-05-30_13:14:04,256"--> store year, month, day, hour, min, seconds, milliseconds into seperate varables
Step2-->t1 = mktime(year" "month" "day" "hour" "min" "seconds)
Step3-->tStart = (t1*1000)+milliseconds
Now i have timestamp in milliseconds....follow the same three steps for the end time(tEnd).

tEnd-tStart-->gives the delay in milliseconds