From e0ab00a4d2f18f18a8d9f28c309bb16723f308b1 Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 23 Dec 2016 09:15:20 +0100 Subject: [PATCH] Launch: Add a timing log to check launch time --- Vector/ViewController/HomeViewController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Vector/ViewController/HomeViewController.m b/Vector/ViewController/HomeViewController.m index b41e0d68e..6b71f8d3d 100644 --- a/Vector/ViewController/HomeViewController.m +++ b/Vector/ViewController/HomeViewController.m @@ -71,6 +71,7 @@ // The launch animation container view UIView *launchAnimationContainerView; + NSDate *launchAnimationStart; } @property(nonatomic,getter=isHidden) BOOL hidden; @@ -805,10 +806,14 @@ [NSLayoutConstraint activateConstraints:@[widthConstraint2, heightConstraint2, centerXConstraint2, centerYConstraint2]]; [activityIndicator startAnimating]; + + launchAnimationStart = [NSDate date]; } } else if (launchAnimationContainerView) { + NSLog(@"[HomeViewController] LaunchAnimation was shown for %.3fms", [[NSDate date] timeIntervalSinceDate:launchAnimationStart] * 1000); + [launchAnimationContainerView removeFromSuperview]; launchAnimationContainerView = nil; }