synchronized void refreshStats() {
    if (processCPUTimeAvailable) {
      Number processCpuTime = statsMap.getOrDefault(StatsKey.VM_PROCESS_CPU_TIME, 0);

      // Some JVM like IBM is not handled by Stats layer properly. Ignoring the attribute for such
      // cases
      if (processCpuTime == null) {
        cpuUsage = VALUE_NOT_AVAILABLE;
        return;
      }

      if (lastSystemTime == 0) {
        lastSystemTime = currentTimeMillis();
        return;
      }

      long cpuTime = processCpuTime.longValue();
      if (lastProcessCpuTime == 0) {
        lastProcessCpuTime = cpuTime;
        return;
      }

      long systemTime = currentTimeMillis();
      cpuUsage = calculateCpuUsage(systemTime, cpuTime);
      lastSystemTime = systemTime;
      lastProcessCpuTime = cpuTime;
    }
  }
Right now it only refreshes CPU usage in terms of percentage. This method can be used for any
other computation based on Stats in future.
geode-core/src/main/java/org/apache/geode/management/internal/beans/stats/VMStatsMonitor.java