[core] Add pretty print duration function