private void checkWarnings(){
  List<Offer> list=market.getOffersOlderThan(TIME_TO_WARNING);
  long time=System.currentTimeMillis();
  for (  Offer offer : list) {
    long timeDiff=time - timeStamp;
    if (timeStamp != 0 && ((time - offer.getTimestamp() - TIME_TO_WARNING * 1000) > timeDiff)) {
      continue;
    }
    StringBuilder builder=new StringBuilder();
    builder.append("Your offer of ");
    builder.append(Grammar.a_noun(offer.getItemName()));
    builder.append(" will expire in ");
    builder.append(TimeUtil.approxTimeUntil((int)((offer.getTimestamp() - time) / 1000 + TIME_TO_EXPIRING)));
    builder.append(".");
    sendMessage(offer.getOfferer(),builder);
  }
  timeStamp=time;
}

private void checkWarnings ( ) { List < Offer > list = market . getOffersOlderThan ( TIME_TO_WARNING ) ; long time = System . currentTimeMillis ( ) ; for ( Offer offer : list ) { long timeDiff = time - timeStamp ; if ( timeStamp != 0 && ( ( time - offer . getTimestamp ( ) - TIME_TO_WARNING * 1000 ) > timeDiff ) ) { continue ; } StringBuilder builder = new StringBuilder ( ) ; builder . append ( "Your offer of " ) ; builder . append ( Grammar . a_noun ( offer . getItemName ( ) ) ) ; builder . append ( " will expire in " ) ; builder . append ( TimeUtil . approxTimeUntil ( ( int ) ( ( offer . getTimestamp ( ) - time ) / 1000 + TIME_TO_EXPIRING ) ) ) ; builder . append ( "." ) ; sendMessage ( offer . getOfferer ( ) , builder ) ; } timeStamp = time ; }
checks for offers that need a warning before expiring
