I have two buttons one to start my process and another to finish I would like to then work out the total time it took me to complete my process but don't know how to compare the two.
Heres an aproximation of my code:

code:

btnStart.onPress = function(){
started = new Date();
}
btnFinish.onPress = function (){
finished = new Date();
totalTime = new Date (finished - started);
}



if anyone could help me with displaying the time in a text box as 09:05 instead of 9:5 that would help me aswell -

code:

startText.text = started.getHours()+":"+ started.getMinutes();