package Ġcom . dr 1 0 0 9 . app . android . room flow stop watch Ċ Ċ import Ġcom . dr 1 0 0 9 . app . android . room flow stop watch . entity . Measurement Entity Ċ import Ġjava . time . Offset DateTime Ċ import Ġjava . time . temporal . Ch rono Unit Ċ import Ġjava . util .* Ċ Ċ fun ĠMeasurement Entity . sec Until ( until : ĠOffset DateTime ) Ġ= ĊĠĠĠ ĠOffset DateTime . parse ( start DateTime ). until ( until , ĠCh rono Unit . SECONDS ) Ċ Ċ fun Ġformat Measure Time ( duration : ĠLong ): ĠString Ġ{ ĊĠĠĠ Ġval Ġhour Ġ= Ġduration Ġ/ Ġ 3 6 0 0 L ĊĠĠĠ Ġval Ġminute Ġ= Ġduration Ġ% Ġ 3 6 0 0 L Ġ/ Ġ 6 0 L ĊĠĠĠ Ġval Ġsecond Ġ= Ġduration Ġ% Ġ 6 0 L ĊĊĠĠĠ Ġreturn ĠString . format ( Locale . US , Ġ"% 0 2 d :% 0 2 d :% 0 2 d ", Ġhour , Ġminute , Ġsecond ) Ċ }