package Ġpl . be one . prom ena . alf resco . module . core . extension Ċ Ċ import Ġorg . joda . time . format . Period Formatter Builder Ċ import Ġjava . time . Duration Ċ Ċ private Ġval Ġpretty Formatter Ġ= ĠPeriod Formatter Builder () ĊĠĠĠ Ġ. append Days () ĊĠĠĠ Ġ. append Suffix (" d ") ĊĠĠĠ Ġ. append Separator (" Ġ") ĊĠĠĠ Ġ. append Hours () ĊĠĠĠ Ġ. append Suffix (" h ") ĊĠĠĠ Ġ. append Separator (" Ġ") ĊĠĠĠ Ġ. append Minutes () ĊĠĠĠ Ġ. append Suffix (" m ") ĊĠĠĠ Ġ. append Separator (" Ġ") ĊĠĠĠ Ġ. append Seconds () ĊĠĠĠ Ġ. append Suffix (" s ") ĊĠĠĠ Ġ. append Separator (" Ġ") ĊĠĠĠ Ġ. append Millis () ĊĠĠĠ Ġ. append Suffix (" ms ") ĊĠĠĠ Ġ. append Separator (" Ġ") ĊĠĠĠ Ġ. to Formatter () Ċ Ċ private Ġval Ġproperties Formatter Ġ= ĠPeriod Formatter Builder () ĊĠĠĠ Ġ. append Days (). append Suffix (" d ") ĊĠĠĠ Ġ. append Hours (). append Suffix (" h ") ĊĠĠĠ Ġ. append Minutes (). append Suffix (" m ") ĊĠĠĠ Ġ. append Seconds (). append Suffix (" s ") ĊĠĠĠ Ġ. append Millis (). append Suffix (" ms ") ĊĠĠĠ Ġ. to Formatter () Ċ Ċ fun ĠDuration ?. to Pretty String (): ĠString Ġ= ĊĠĠĠ Ġif Ġ( this Ġ!= Ġnull ) Ġpretty Formatter . print ( org . joda . time . Duration . millis ( this . to Millis ()). to Period ()) Ġelse Ġ" infinite " Ċ Ċ fun ĠString . to Duration (): ĠDuration Ġ= ĊĠĠĠ ĠDuration . of Millis ( properties Formatter . parse Period ( this ). to Standard Duration (). millis )