package org.jenkinsci.plugins.p4.tasks; import java.util.Date; import java.util.concurrent.TimeUnit; public class TimeTask { long start; public TimeTask() { start = new Date().getTime(); } private long getDuration() { long stop = new Date().getTime(); return stop - start; } public String toString() { if (start == 0) { return "Timer not started"; } long ms = getDuration(); if (ms < 1000) { return "(" + ms + "ms)"; } long mins = TimeUnit.MILLISECONDS.toMinutes(ms); ms -= TimeUnit.MINUTES.toMillis(mins); long secs = TimeUnit.MILLISECONDS.toSeconds(ms); return mins + "m " + secs + "s"; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20641 | Paul Allen | Copy main -> dev (jenkinsci/p4-plugin) | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/tasks/TimeTask.java | |||||
#1 | 11334 | Paul Allen |
Remote slave support for Publish Perforce Publish commands need to be executed from the remote slave. - Includes refactoring into task package |
||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/TimeTask.java | |||||
#1 | 10939 | Paul Allen |
Tidy up changes. - Moved duration timings to ClientHelper and measure each task individually. - White space/formatting on P4ChangeEntry. - Temporarily backed-out p4-plugin.properties file (could damage builds - need to understand requirements) |