private Long getFieldTimeValue(Descriptor descriptor, Descriptor mbean, String field) {
    Logger logger = getLogger();

    Object value = descriptor.getFieldValue(field);
    if (logger.isEnabledFor(Logger.DEBUG)) {
      logger.debug("Descriptor's " + field + " field: " + value);
    }

    if (value == null && mbean != null) {
      value = mbean.getFieldValue(field);
      if (logger.isEnabledFor(Logger.DEBUG)) {
        logger.debug("MBean's " + field + " field: " + value);
      }
      if (value == null) {
        return null;
      }
    }

    if (value instanceof Number) {
      return ((Number) value).longValue();
    }

    if (value instanceof String) {
      try {
        long ctl = Long.parseLong((String) value);
        return ctl;
      } catch (NumberFormatException x) {
        return 0L;
      }
    }
    return 0L;
  }
@author <a href="mailto:biorn_steedom@users.sourceforge.net">Simone Bordet</a>
@version $Revision: 1.14 $
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MX4JModelMBean.java