Skip to content

topl-service / io.matthewnelson.topl_service / TorServiceController / Builder / addTimeToRestartTorDelay


fun addTimeToRestartTorDelay(milliseconds:Long): Builder (source)

Default is set to 500ms, (what this method adds time to).

A slight delay is required when starting and stopping Tor to allow the Process for which it is running in to settle. This method adds time to the cautionary delay between execution of stopTor and startTor, which are the individual calls executed when using the restartTor method.

The call to restartTor executes individual commands to:

  • stop tor + delay (300ms)
  • delay (500ms) <---------------------- what this method will add to
  • start tor + delay (300ms)


milliseconds - A value greater than 0

See Also