Last active
October 3, 2016 23:16
-
-
Save geoffreywiseman/ad00e0420c75febf38661a25c84d1e19 to your computer and use it in GitHub Desktop.
Signpost Helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public class Signpost { | |
static func start( code:UInt32, arg1:UInt = 0, arg2:UInt = 0, arg3:UInt = 0, arg4:UInt = 0 ) -> Int32 { | |
if #available(iOS 10.0, *) { | |
return kdebug_signpost_start(code,arg1,arg2,arg3,arg4); | |
} else { | |
return 0; | |
} | |
} | |
static func end( code:UInt32, arg1:UInt = 0, arg2:UInt = 0, arg3:UInt = 0, arg4:UInt = 0 ) -> Int32 { | |
if #available(iOS 10.0, *) { | |
return kdebug_signpost_end(code,arg1,arg2,arg3,arg4) | |
} else { | |
return 0; | |
} | |
} | |
static func point( code:UInt32, arg1:UInt = 0, arg2:UInt = 0, arg3:UInt = 0, arg4:UInt = 0 ) -> Int32 { | |
if #available(iOS 10.0, *) { | |
return kdebug_signpost(code,arg1,arg2,arg3,arg4) | |
} else { | |
return 0; | |
} | |
} | |
static func id() -> UInt { | |
return UInt(arc4random_uniform(256)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment