public void start(int interval,boolean beep){
ActionListener listener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println("At the tone,the time is " + new Date());
if(beep) Toolkit.getDefaultToolkit().beep();
}
};
}