Skip to content

Commit

Permalink
PDFBOX-2941: improve time display
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1920157 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Aug 24, 2024
1 parent b089299 commit e39e166
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ protected BufferedImage doInBackground() throws IOException
BufferedImage image = renderer.renderImage(pageIndex, scale, ImageTypeMenu.getImageType(), RenderDestinationMenu.getRenderDestination());
long t1 = System.nanoTime();

long ms = TimeUnit.MILLISECONDS.convert(t1 - t0, TimeUnit.NANOSECONDS);
labelText = "Rendered in " + ms + " ms";
float s = TimeUnit.MILLISECONDS.convert(t1 - t0, TimeUnit.NANOSECONDS) / 1000f;
labelText = "Rendered in " + s + " second" + (s > 1 ? "s" : "");
statuslabel.setText(labelText);

// debug overlays
Expand Down

0 comments on commit e39e166

Please sign in to comment.