DebugUtils

public struct DebugUtils

调试工具类

  • 获取内存地址

    Declaration

    Swift

    public static func address(_ o: UnsafeRawPointer) -> String
    Parameters
    values

    o

    地址,使用&符号

    Return Value

    地址

  • 获取class的地址

    Declaration

    Swift

    public static func address<T>(_ o: T) -> String where T : AnyObject
    Parameters
    o

    类实例

    Return Value

    地址

  • 计算执行时长

    Declaration

    Swift

    public static func measureTime(f: () -> Void) -> CFTimeInterval
    Parameters
    f

    执行体

    Return Value

    时长