mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
...
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
*
|
||||
* This file is Created by fankes on 2022/2/4.
|
||||
*/
|
||||
@file:Suppress("unused", "UNCHECKED_CAST", "MemberVisibilityCanBePrivate")
|
||||
@file:Suppress("unused", "UNCHECKED_CAST", "MemberVisibilityCanBePrivate", "EXPERIMENTAL_API_USAGE")
|
||||
|
||||
package com.highcapable.yukihookapi.hook.core.finder
|
||||
|
||||
|
@@ -30,6 +30,8 @@ package com.highcapable.yukihookapi.hook.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.highcapable.yukihookapi.annotation.DoNotUseClass;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -38,6 +40,7 @@ import java.util.HashMap;
|
||||
import de.robv.android.xposed.XposedHelpers;
|
||||
|
||||
@SuppressWarnings("ALL")
|
||||
@DoNotUseClass
|
||||
public class ReflectionUtils {
|
||||
|
||||
private static final HashMap<String, Field> fieldCache = new HashMap<>();
|
||||
|
@@ -25,13 +25,19 @@
|
||||
*
|
||||
* This file is Created by fankes on 2022/2/5.
|
||||
*/
|
||||
@file:Suppress("EXPERIMENTAL_API_USAGE")
|
||||
|
||||
package com.highcapable.yukihookapi.hook.utils
|
||||
|
||||
import com.highcapable.yukihookapi.annotation.DoNotUseClass
|
||||
import com.highcapable.yukihookapi.annotation.DoNotUseMethod
|
||||
|
||||
/**
|
||||
* 计算方法执行耗时
|
||||
* @param block 方法块
|
||||
* @return [RunBlockResult]
|
||||
*/
|
||||
@DoNotUseMethod
|
||||
inline fun <R> runBlocking(block: () -> R): RunBlockResult {
|
||||
val start = System.currentTimeMillis()
|
||||
block()
|
||||
@@ -42,6 +48,7 @@ inline fun <R> runBlocking(block: () -> R): RunBlockResult {
|
||||
* 构造耗时计算结果类
|
||||
* @param after 耗时
|
||||
*/
|
||||
@DoNotUseClass
|
||||
class RunBlockResult(private val after: Long) {
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user