This commit is contained in:
Looly
2023-03-13 11:41:20 +08:00
parent 0df74202c2
commit 1ad628f944
25 changed files with 59 additions and 54 deletions

View File

@@ -32,10 +32,16 @@ public class JdkInterceptor implements InvocationHandler, Serializable {
this.aspect = aspect;
}
/**
* 获取目标对象
*
* @return 目标对象
*/
public Object getTarget() {
return this.target;
}
@SuppressWarnings("SuspiciousInvocationHandlerImplementation")
@Override
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
final Object target = this.target;

View File

@@ -29,7 +29,7 @@ public class CpuTicks {
public CpuTicks(final CentralProcessor processor, final long waitingTime) {
// CPU信息
final long[] prevTicks = processor.getSystemCpuLoadTicks();
// 这里必须设置延迟
// 这里必须设置延迟
Util.sleep(waitingTime);
final long[] ticks = processor.getSystemCpuLoadTicks();