@@ -0,0 +1,2462 @@
+package org.bitrepository.monitoringservice.utils;%0A%0A/**%0A * Util class to handle the presentation of time in a human readable form %0A */%0Apublic final class TimeUtils %7B%0A    %0A    private static final int MS_PER_S = 1000;%0A    private static final int S_PER_M = 60;%0A    private static final int M_PER_H = 60;%0A    private static final int H_PER_D = 24;%0A    private static final int MS_PER_MINUTE = MS_PER_S * S_PER_M;%0A    private static final int MS_PER_HOUR = MS_PER_MINUTE * M_PER_H;%0A    private static final long MS_PER_DAY = MS_PER_HOUR * H_PER_D;%0A    %0A    /** Private constructor, util class.*/%0A    private TimeUtils() %7B%7D%0A    %0A    public static String millisecondsToSeconds(long ms) %7B%0A        return %22%22 + (ms / MS_PER_S) + %22seconds%22;%0A    %7D%0A    %0A    public static String millisecondsToMinutes(long ms) %7B%0A        return %22%22 + (ms / ( MS_PER_S * S_PER_M )) + %22minutes%22;%0A    %7D%0A    %0A    public static String millisecondsToHours(long ms) %7B%0A        return %22%22 + (ms /( MS_PER_S * S_PER_M * M_PER_H )) + %22hours%22;%0A    %7D%0A    %0A    public static String millisecondsToDays(long ms) %7B%0A        return %22%22 + (ms /( MS_PER_S * S_PER_M * M_PER_H * H_PER_D)) + %22days%22;%0A    %7D%0A    %0A    public static String millisecondsToHuman(long ms) %7B%0A        StringBuilder sb = new StringBuilder();%0A        int days = 0, hours = 0, minutes = 0, seconds = 0;%0A        if(ms %3E 0) %7B%0A            days = (int) (ms / MS_PER_DAY);%0A            if(days %3E 0) %7B%0A                sb.append(%22%22 + days + %22d%22);%0A            %7D%0A            ms = (ms %25 MS_PER_DAY);%0A            if(ms %3E 0) %7B%0A                hours = (int) (ms / MS_PER_HOUR);%0A                if(hours %3E 0) %7B%0A                    sb.append(%22 %22 + hours + %22h%22);%0A                %7D%0A                ms = (ms %25 MS_PER_HOUR);%0A                if( ms %3E 0) %7B%0A                    minutes = (int) (ms / MS_PER_MINUTE);%0A                    if(minutes %3E 0) %7B%0A                        sb.append(%22 %22 + minutes + %22m%22);%0A                    %7D%0A                    ms = (ms %25 MS_PER_MINUTE);%0A                    if(ms %3E 0) %7B%0A                        seconds = (int) (ms / MS_PER_S);%0A                        if(seconds %3E 0) %7B%0A                            sb.append(%22 %22 + seconds + %22s%22);%0A                        %7D%0A                        ms = (ms %25 MS_PER_S);%0A                        if(ms %3E 0) %7B%0A                            sb.append(%22 %22 + ms + %22ms%22);%0A                        %7D%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A        return sb.toString();%0A    %7D%0A    %0A%7D%0A

Add TimeUtils class to monitoring service, not needed yet.