cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
terapin
Level VI

Calculate Elapsed Time for JSL Code to Run?

I was wondering if there is a way to calculate how much time a particular JSL program took to execute? I couldn't find any information in the JSL scripting guide regarding this. Any ideas?
1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: Calculate Elapsed Time for JSL Code to Run?

Look at the Tick Seconds() function.

Use it something like this:

start=tick seconds();

//[some jsl]

end=tick seconds();

runtime=end-start;
-Jeff

View solution in original post

3 REPLIES 3
Jeff_Perkinson
Community Manager Community Manager

Re: Calculate Elapsed Time for JSL Code to Run?

Look at the Tick Seconds() function.

Use it something like this:

start=tick seconds();

//[some jsl]

end=tick seconds();

runtime=end-start;
-Jeff
gflex
Level III

Re: Calculate Elapsed Time for JSL Code to Run?

alternatively, can capture current time and use for calculation or display. This example prints to log.

v_start_text = "STARTED:" || Format( Today(), "m/d/y h:m:s" );
Show( v_start_text );

// body of script here

v_end_text = "ENDED:" || Format( Today(), "m/d/y h:m:s" );
Show( v_end_text );
terapin
Level VI

Re: Calculate Elapsed Time for JSL Code to Run?

Thanks Jeff,

This is exactly what I was looking for.

Recommended Articles