public boolean checkTimeBounds() {
        boolean terminate;
        cal = new GregorianCalendar();
        
        double test = terminate_time;

        double time;
//        double timeTerminate = 22.30; // 17.30
        double timeTerminate = test;

        int hour = cal.get(Calendar.HOUR_OF_DAY);
        int minute = cal.get(Calendar.MINUTE);

        double d_hour = (double) hour;
        double d_minute = (double) minute / 100;

        time = d_hour;
        time += d_minute;
        
        // if the current time is 17.30 PM
        if (time == timeTerminate || time > timeTerminate) {
            // inform the system to terminate
            terminate = true;
        } else {
            // inform the system to continue running
            terminate = false;
        }

        return terminate;
    }