How to add hours, seconds and milliseconds in android?

0

Good, I have the following problem, I have implemented a chronometer that calculates me up to milliseconds, the time is returned to me in a textview, so it is a string. Sometimes I need to add several times of the chronometer, how do I convert my string with the format "12: 12: 34: 456" in such a way to be able to add it with another time of the same format? I need to add, for example: "12: 12: 34: 456" + "1: 23: 43: 435" and return the time of the sum.

I tried converting to dateformat but it does not work

 SimpleDateFormat formato = new SimpleDateFormat("HH:mm:ss:SSS");

format.parse (Textview.getText (). toString ());

    
asked by Memphils 16.11.2017 в 23:49
source

0 answers