@Deprecated public String calcElapsedTime() { return DurationFormat.SHORT.format( timer.getElapsed() ); }
@Deprecated public String calcElapsedTime() { return DurationFormat.SHORT.format( timer.getElapsed() ); }
protected void updateProgress() { int pc = (int) ((100.0*progress) / progressLength); if( pc == progressPercent ) return; progressPercent = pc; // delete the previous line out.print( '\r' ); // print the new message out.print( progressTitle ); out.print( ": " ); out.print( progressMessage ); out.print( " " ); out.print( progressPercent ); out.print( "% complete in " ); out.print( DurationFormat.SHORT.format( timer.getElapsed() ) ); }
protected void updateProgress() { int pc = (int) ((100.0*progress) / progressLength); if( pc == progressPercent ) return; progressPercent = pc; // delete the previous line out.print( '\r' ); // print the new message out.print( progressTitle ); out.print( ": " ); out.print( progressMessage ); out.print( " " ); out.print( progressPercent ); out.print( "% complete in " ); out.print( DurationFormat.SHORT.format( timer.getElapsed() ) ); }
public String format() { return DurationFormat.LONG.format( getTotal() + getElapsed() ); } }
public String format() { return DurationFormat.LONG.format( getTotal() + getElapsed() ); } }
public int compare(Timer o1, Timer o2) { if( sortBy.equalsIgnoreCase( "Total" ) ) { long t1 = o1.getTotal(); long t2 = o2.getTotal(); if( t1 == 0 ) t1 = o1.getElapsed(); if( t2 == 0 ) t2 = o2.getElapsed(); return (int)(t2 -t1); } else if( sortBy.equalsIgnoreCase( "Avg" ) ) return (int)(o2.getAverage() - o1.getAverage()); else if( sortBy.equalsIgnoreCase( "Count" ) ) return (int)(o2.getCount() - o1.getCount()); else return AlphaNumericComparator.CASE_INSENSITIVE.compare( o1, o2 ); } });
public int compare(Timer o1, Timer o2) { if( sortBy.equalsIgnoreCase( "Total" ) ) { long t1 = o1.getTotal(); long t2 = o2.getTotal(); if( t1 == 0 ) t1 = o1.getElapsed(); if( t2 == 0 ) t2 = o2.getElapsed(); return (int)(t2 -t1); } else if( sortBy.equalsIgnoreCase( "Avg" ) ) return (int)(o2.getAverage() - o1.getAverage()); else if( sortBy.equalsIgnoreCase( "Count" ) ) return (int)(o2.getCount() - o1.getCount()); else return AlphaNumericComparator.CASE_INSENSITIVE.compare( o1, o2 ); } });
row.add(String.valueOf(timer.getElapsed())); else row.add(String.valueOf(timer.getTotal()));
row.add(String.valueOf(timer.getElapsed())); else row.add(String.valueOf(timer.getTotal()));
/** * Check if the elapsed time is greater than the timeout limit and throw a TimeoutException * if that is the case. Check the parent timer if there is one. * * @throws TimeoutException */ public void check() throws TimeoutException, TimerInterruptedException { if ( interrupted ) { interrupted = false; throw new TimerInterruptedException("Timer " + getName() + " interrupted."); } long elapsed = getElapsed(); if (timeout != NO_TIMEOUT && elapsed > timeout) { throw new TimeoutException("Running time of "+name+" exceeded timeout of "+timeout); } if (parent != null) parent.check(); }
/** * Check if the elapsed time is greater than the timeout limit and throw a TimeoutException * if that is the case. Check the parent timer if there is one. * * @throws TimeoutException */ public void check() throws TimeoutException, TimerInterruptedException { if ( interrupted ) { interrupted = false; throw new TimerInterruptedException("Timer " + getName() + " interrupted."); } long elapsed = getElapsed(); if (timeout != NO_TIMEOUT && elapsed > timeout) { throw new TimeoutException("Running time of "+name+" exceeded timeout of "+timeout); } if (parent != null) parent.check(); }
log.fine( "Consistent: " + consistent + " Time: " + t.getElapsed() +" Branches " + abox.branches.size() +" Tree depth: " + abox.stats.treeDepth + " Tree size: " + abox.getNodes().size()
log.fine( "Consistent: " + consistent + " Time: " + t.getElapsed() +" Branches " + abox.branches.size() +" Tree depth: " + abox.stats.treeDepth + " Tree size: " + abox.getNodes().size()