public void schedulePeriodicStats ( ) { Runnable statsPrinter = new Runnable ( ) { @ Override public void run ( ) { printStatistics ( ) ; } } ; m_scheduler . scheduleWithFixedDelay ( statsPrinter , m_config . displayinterval , m_config . displayinterval , TimeUnit . SECONDS ) ; }
Add a task to the scheduler to print statistics to the console at regular intervals .