getElapsedRunningTime

long session.getElapsedRunningTime ( ) (professional and enterprise editions only)

Description

Get how long the current session has been running.

Parameters

This method does not receive any parameters.

Return Values

Returns number of milliseconds the scrape has been running, as a long (8-byte integer).

Change Log

Version Description
4.5 Available for professional and enterprise editions.

If you would like to log the running time of the scraping session you should use logElapsedRunningTime.

Examples

Generic Scrape Timeout

 // On pagination iterator

 // Setup length to run
 timeout = 1000*60*60*24; // 1 day

 // Check how long scrape has been running
 if (session.getElapsedRunningTime() >= timeout )
 {
     session.stopScraping();
 }

See Also