/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

import java.math.BigDecimal;
import java.time.Duration;
import java.time.Instant;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{

        Runnable runnable = ( ) -> {
            System.out.println( "Running the runnable at " + Instant.now() );
        };

        ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
        scheduledExecutorService.schedule( runnable , 10 , TimeUnit.SECONDS ); // Wait ten seconds before running the runnable.

        try
        {
            Thread.sleep( Duration.ofSeconds( 12 ).toMillis() ); // Wait long enough for the background thread to do its thing.
        }
        catch ( InterruptedException e )
        {
            e.printStackTrace();
        }
        
        // Clean-up.
		scheduledExecutorService.shutdown();
		
        System.out.println( "Done at " + Instant.now() );
        
	}
}