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 | |
final class ConcurrentPerformer { | |
func perform<T>(_ objects: [T], iterations: Int? = nil, action: ((T) -> ())) { | |
if let iterations = iterations { | |
customPerform(objects, iterations: iterations, action: action) | |
} else { | |
defaultPerform(objects, action: action) | |
} |
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 | |
final class TimeProfiler { | |
typealias TimeMeasurementTimestamp = TimeInterval | |
public typealias TimeMeasurementDescription = String | |
public static func measure<R>( | |
description: TimeMeasurementDescription, | |
action: (() throws -> (R))) |
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
- (NSString*)hexStringFromString:(NSString*)string | |
{ | |
const char *utf8 = [string UTF8String]; | |
NSMutableString *result = [NSMutableString new]; | |
for (int i = 0; i < string.length; i++) { | |
[result appendFormat:@"0x%02X, ", *utf8++ & 0x00FF]; | |
} | |
return result; | |
} |
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
// | |
// AppDelegateHandler.swift | |
// Pods | |
// | |
// Created by Andrey Zarembo on 10.02.16. | |
// | |
// | |
import Foundation |
NewerOlder