Calculate total time

frappe.ui.form.on(“Sprint Task”, “expected_time”, function(frm, cdt, cdn) {
var child = locals[cdt][cdn];
extime = child.expected_time;
alert(extime);
frappe.model.set_value(cdt, cdn, ‘total’,extime)
cur_frm.set_value(‘total’, extime);
});

here sprint task is the child and sprint is parent. I want to calculate the totel time(ie sum of expected_time) from child table and want to display in parent table . please help me
In the above code upto alert it is ok

Did you get any solution yet ?? I have this issue also.