A Number that specifies the duration, in milliseconds, between one automatic execution of the current JSDOSession or Session object's ping( ) method and the next.
Setting this property to a value greater than zero (0) causes the JSDOSession or Session object to begin executing its ping( ) method, and when execution completes, to repeatedly execute the method after the specified delay. If you set its value to zero (0), no further execution of ping( ) occurs after any current execution completes. The default value is zero (0).
You can set pingInterval to start the automatic execution of ping( ) any time after you create the JSDOSession or Session object. However, ping( ) does not begin executing until and unless you have successfully invoked the object's login( ) method to start a user login session.
Note that when you call the ping( ) method directly, you have several options for how to call it to get the results. You do not have these options and you cannot get results directly from each automatic execution of ping( ) that begins from a setting of pingInterval. The effects from this automatic execution are limited to causing the JSDOSession or Session object to fire its offline or online event, and to change the value of its connected property, when a given ping( ) execution detects a change in the object's online status.