src/main/java/se/kth/iv1351/weatherstat/controller/Controller.java
/**
     * Starts a separate thread that will call {@link #loadFromAllApis()} once per
     * hour, starting after one hour. The hourly loading continues until
     * {@link #stopHourlyLoading()} is called. A call to this method when hourly
     * loading is already running has no effect.
     */
Starts a separate thread that will call  #loadFromAllApis() once per
hour, starting after one hour. The hourly loading continues until
#stopHourlyLoading() is called. A call to this method when hourly
loading is already running has no effect.
Starts a separate thread that will call #loadFromAllApis () once per hour starting after one hour . The hourly loading continues until #stopHourlyLoading () is called . A call to this method when hourly loading is already running has no effect .
public void startHourlyLoading() {
        if (hourlyLoader != null) {
            return;
        }
        int noOfIdleThreads = 0;
        int initialDelay = 1;
        int interval = 1;
        hourlyLoader = new ScheduledThreadPoolExecutor(noOfIdleThreads);
        hourlyLoader.scheduleAtFixedRate(() -> loadFromAllApis(),
                                         initialDelay, interval, TimeUnit.HOURS);
    }
public void startHourlyLoading ( ) { if ( hourlyLoader != null ) { return ; } int noOfIdleThreads = 0 ; int initialDelay = 1 ; int interval = 1 ; hourlyLoader = new ScheduledThreadPoolExecutor ( noOfIdleThreads ) ; hourlyLoader . scheduleAtFixedRate ( ( ) -> loadFromAllApis ( ) , initialDelay , interval , TimeUnit . HOURS ) ; }
Starts a separate thread that will call {@link #loadFromAllApis()} once per
 hour, starting after one hour.
Starts a separate thread that will call { @link #loadFromAllApis () } once per hour starting after one hour .