!7 sclass JavaPlusHotSpotCPUPercentage extends DynBigNumber { transient O cpuMonitor; transient RollingAverage avg = new(5); // =10 seconds transient double recentValue; start { setDescription("JAVA + HOTSPOT CPU %"); setToolTip("Percentage is per core"); cpuMonitor = runDependent(#1001405); ownTimer(doEvery(2.0, r actualUpdate)); } void actualUpdate { recentValue = (double) call(cpuMonitor, 'getInProcessCPU) + (double) get(cpuMonitor, 'compilationPercentage); avg.add(recentValue); setValue(iceil(avg!) + " %"); } }