Functions
The following functions are available globally.
-
get current host time in nanoseconds
Declaration
Objective-C
extern uint64_t getTimeInNanoseconds()Swift
func getTimeInNanoseconds() -> UInt64Return Value
current host time in nanoseconds
-
get current host time in milliseconds
Declaration
Objective-C
extern int64_t getUptimeInMilliseconds()Swift
func getUptimeInMilliseconds() -> Int64Return Value
current host time in milliseconds
-
calculate difference between two timeval timestamps
Declaration
Objective-C
extern long timevaldiff(struct timeval *t1, struct timeval *t2)Swift
func timevaldiff(_ t1: UnsafeMutablePointerParameters
t1a struct timeval parameter
t2a struct timeval parameter
Return Value
difference between two timeval timestamps
-
Returns a dotted decimal string for the specified address (a (struct sockaddr) within the address NSData).
Declaration
Objective-C
extern NSString *DisplayAddressForAddress(NSData *address)Swift
func DisplayAddressForAddress(_ address: Data!) -> String!Parameters
addressan address structure
Return Value
string
-
Returns a human readable string for the given data.
Declaration
Objective-C
extern NSString *DisplayStringFromData(NSData *data)Swift
func DisplayStringFromData(_ data: Data!) -> String!Parameters
databinary data
Return Value
string
-
Returns hex representation of contents of ‘data’
Declaration
Objective-C
extern NSString *DisplayHexStringFromData(NSData *data)Swift
func DisplayHexStringFromData(_ data: Data!) -> String!Parameters
databinary data
Return Value
hex string
-
Given an NSError, returns a short error string that we can print, handling some special cases.
Declaration
Objective-C
extern NSString *DisplayErrorFromError(NSError *error)Swift
func DisplayErrorFromError(_ error: Error!) -> String!Parameters
erroran NSError instance
Return Value
string
View on GitHub
Functions Reference