Methods Summary |
---|
public synchronized void | cancel()
if ( current_event != null ){
current_event.cancel();
cancelled = true;
}
|
protected long | getFrequency()
return( frequency );
|
protected TimerEventPerformer | getPerformer()
return( performer );
|
protected java.lang.String | getString()
TimerEvent ce = current_event;
String ev_data;
if ( ce == null ){
ev_data = "?";
}else{
ev_data = "when=" + ce.getWhen() + ",run=" + ce.hasRun() + ", can=" + ce.isCancelled();
}
return( ev_data + ",freq=" + getFrequency() + ",target=" + getPerformer() + (name==null?"":(",name=" + name )));
|
protected boolean | isCancelled()
return( cancelled );
|
public void | perform(TimerEvent event)
if ( !cancelled ){
try{
performer.perform( event );
}catch( Throwable e ){
DebugLight.printStackTrace( e );
}
synchronized( this ){
if ( !cancelled ){
current_event = timer.addEvent(name, SystemTime.getCurrentTime()+ frequency,
this );
}
}
}
|
public void | setName(java.lang.String _name)
name = _name;
synchronized( this ){
if ( current_event != null ){
current_event.setName( name );
}
}
|