protected BackgroundTask(long timeout,TimeUnit timeUnit,Frame ownerFrame){
  this.ownerFrame=ownerFrame;
  this.timeoutMilliseconds=timeUnit.toMillis(timeout);
}

protected BackgroundTask ( long timeout , TimeUnit timeUnit , Frame ownerFrame ) { this . ownerFrame = ownerFrame ; this . timeoutMilliseconds = timeUnit . toMillis ( timeout ) ; }
create a task with timeout .
