So, I am working on the paint for my NMZ bot, everything works great except for the TTL paint. It is displayed in MS. I have tried multiple time formatters and stringbuilders but my implementation has to be wrong because none of them work.
Current code
g.drawString(this.getExperienceTracker().getGainedXP(Skill.DEFENCE) + " (" + this.getExperienceTracker().getGainedXPPerHour(Skill.DEFENCE) + ")" + " [" + this.getExperienceTracker().getGainedLevels(Skill.DEFENCE) + "]" + " {" + getExperienceTracker().getTimeToLevel(Skill.DEFENCE) + "}", 223, 443);
(yes I know there is nothing currently there to format time, I removed non working snippets.)
Current time formatting
public final String formatTime(final long ms){
long s = ms / 1000, m = s / 60, h = m / 60, d = h / 24;
s %= 60; m %= 60; h %= 24;
return d > 0 ? String.format("%02d:%02d:%02d:%02d", d, h, m, s) :
h > 0 ? String.format("%02d:%02d:%02d", h, m, s) :
String.format("%02d:%02d", m, s);
}