protected static double getWallClockMinutes(WorkflowInstance inst) {
    if (inst == null) {
      return 0.0;
    }

    Date currentDateOrStopTime =
        (inst.getEndDateTimeIsoStr() != null
                && !inst.getEndDateTimeIsoStr().equals("")
                && !inst.getEndDateTimeIsoStr().equals("null"))
            ? safeDateConvert(inst.getEndDateTimeIsoStr())
            : new Date();

    Date workflowStartDateTime = null;

    if (inst.getStartDateTimeIsoStr() == null
        || (inst.getStartDateTimeIsoStr() != null
            && (inst.getStartDateTimeIsoStr().equals("")
                || inst.getStartDateTimeIsoStr().equals("null")))) {
      return 0.0;
    }

    try {
      workflowStartDateTime = DateConvert.isoParse(inst.getStartDateTimeIsoStr());
    } catch (ParseException e) {
      return 0.0;
    }

    long diffMs = currentDateOrStopTime.getTime() - workflowStartDateTime.getTime();
    double diffSecs = (diffMs * 1.0 / 1000.0);
    double diffMins = diffSecs / 60.0;
    return diffMins;
  }