/** * Tae Won Ha - http://taewon.de - @hataewon * See LICENSE */ import Cocoa import GameKit import os @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet weak var window: NSWindow! var result = Array<[[FontGlyphRun]]>(repeating: [], count: count) func applicationDidFinishLaunching(_ aNotification: Notification) { var results = [CFTimeInterval]() let repeatCount = 5 for _ in (0.. Void) -> CFTimeInterval { let start = CFAbsoluteTimeGetCurrent() body() return CFAbsoluteTimeGetCurrent() - start } } private let count = 500