I need to format my time string such as this:
int time = 160;
Here\'s my sample code:
public static String formatDuration(
int minutes = 160; int h = minutes / 60; int m = minutes % 60; String.format("%d hr %d mins",h,m); // output : 2 hr 40 mins