public boolean markTimeIfDelay(World world,long delay){
  if (world == null) {
    return false;
  }
  long currentTime=world.getTotalWorldTime();
  if (currentTime < lastMark) {
    lastMark=currentTime;
    return false;
  }
 else   if (lastMark + delay + lastRandomDelay <= currentTime) {
    duration=currentTime - lastMark;
    lastMark=currentTime;
    lastRandomDelay=(int)(Math.random() * randomRange);
    return true;
  }
 else {
    return false;
  }
}

public boolean markTimeIfDelay ( World world , long delay ) { if ( world == null ) { return false ; } long currentTime = world . getTotalWorldTime ( ) ; if ( currentTime < lastMark ) { lastMark = currentTime ; return false ; } else if ( lastMark + delay + lastRandomDelay <= currentTime ) { duration = currentTime - lastMark ; lastMark = currentTime ; lastRandomDelay = ( int ) ( Math . random ( ) * randomRange ) ; return true ; } else { return false ; } }
return true if a given delay has passed since last time marked was called successfully .
