Created
October 19, 2016 16:08
-
-
Save jacobvanorder/d0f105d2bb9ede4515e534de86ae3ba2 to your computer and use it in GitHub Desktop.
iOS Swift Start Up Measurement from main
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
// | |
// AppDelegate.swift | |
// | |
// Created by Jacob Van Order on 10/19/16. | |
// | |
// | |
import UIKit | |
//@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
//… | |
func applicationDidBecomeActive(_ application: UIApplication) { | |
let nowTime = CFAbsoluteTimeGetCurrent() | |
NSLog("Start up in:\(abs(StartTime - nowTime))") | |
} | |
//… | |
} |
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
// | |
// main.swift | |
// | |
// Created by Jacob Van Order on 10/19/16. | |
// | |
// | |
import UIKit | |
let StartTime = CFAbsoluteTimeGetCurrent() | |
UIApplicationMain(CommandLine.argc, | |
UnsafeMutableRawPointer(CommandLine.unsafeArgv).bindMemory(to: UnsafeMutablePointer<Int8>.self, capacity: Int(CommandLine.argc)), | |
nil, | |
NSStringFromClass(AppDelegate.self)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment