class DebugUtils {

  public static void logElapsedTime(long beginMillis, String functionDesc) {
    if (!DEBUG) {
      return;
    }

    long end = System.currentTimeMillis();
    long elapsed = end - beginMillis;
    if (elapsed <= 0) {
      return;
    }

    String message = LOG_PREFIX + "功能[" + functionDesc + "]消耗的时间为[" + elapsed + "]毫秒";
    logger.info(message);
  }

}