Project

General

Profile

Defect #883

Elapsed time calculation in sample not working

Added by Steve Hawes over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
09/25/2015
Due date:
% Done:

0%

Estimated time:
Browser (if web client):
Safari 8.0.8

Description

When I import and run the sample the footer of the PDF page is supposed to show the elapsed time for the report to run but this does not work. I have tried various things to get this to work but none seem to give the desired result! The first thing was to get the start time in milliseconds in the context by using context.start = Date.now() and I can see that this works OK but nothing I do will get the elapsed calculation to work properly!


Files

Velocity_error.jpg (29.3 KB) Velocity_error.jpg Screenshot of PDF output Steve Hawes, 09/25/2015 02:02 PM

History

#1

Updated by Patrick Talbot over 8 years ago

  • Status changed from New to Rejected

If you set

context.start = new Date().getTime();

You can later do this in your template to get the elapsed time (in milliseconds):
#set($ms = $start - $now.time)
$ms

Also available in: Atom PDF