<NME> YJTimeline.swift
<BEF> //
//  YJTimeline.swift
//  YJCocoa
//
//  HomePage:https://github.com/937447974/YJCocoa
//  YJ技术支持群:557445088
//
import UIKit

/// 时间轴记录
public class YJTimeline: NSObject {
    
    static var log: String?
    static var time: CFAbsoluteTime = 0
    
    /// 添加时间轴步骤
    public static func add(strp: String) {
        if self.log == nil {
            self.log = strp
        } else {
            let time = String(format: " %.3f", CFAbsoluteTimeGetCurrent() - self.time)
            self.log = self.log! + time + "\n\t" + strp
        }
        self.time = CFAbsoluteTimeGetCurrent()
    }
            self.log = self.log! + time + "\n\t" + step
        }
        self.time = CFAbsoluteTimeGetCurrent()
    }
    
    /// 结束并打印日志
    public static func end() {
        guard let log = self.log else {
            return
        }
        let time = String(format: " %.3f", CFAbsoluteTimeGetCurrent() - self.time)
        YJLogDebug(log + time)
        self.log = nil
    }
    
}

<MSG> feat: YJTimeline 测试

<DFF> @@ -8,18 +8,19 @@
 import UIKit
 
 /// 时间轴记录
+@objcMembers
 public class YJTimeline: NSObject {
     
     static var log: String?
     static var time: CFAbsoluteTime = 0
     
     /// 添加时间轴步骤
-    public static func add(strp: String) {
+    public static func add(step: String) {
         if self.log == nil {
-            self.log = strp
+            self.log = step
         } else {
             let time = String(format: " %.3f", CFAbsoluteTimeGetCurrent() - self.time)
-            self.log = self.log! + time + "\n\t" + strp
+            self.log = self.log! + time + "\n\t" + step
         }
         self.time = CFAbsoluteTimeGetCurrent()
     }

{'commit': 'diff --git a/Demo/OC/DeveloperTools/YJTimeline/Podfile b/Demo/OC/DeveloperTools/YJTimeline/Podfile\nindex 5d7dac0..ef71acd 100644\n--- a/Demo/OC/DeveloperTools/YJTimeline/Podfile\n+++ b/Demo/OC/DeveloperTools/YJTimeline/Podfile\n@@ -1,6 +1,8 @@\n+# Uncomment the next line to define a global platform for your project\n platform :ios, \'9.0\'\n use_frameworks!\n \n-target \'YJTimeline\' do\n-    pod \'YJCocoa/DeveloperTools/Timeline\', :path => "../../../YJCocoaOC.podspec"\n+target \'YJTimeline\' do  \n+  pod \'YJCocoa/DeveloperTools/Timeline\', :path => "../../../../"\n+\n end\ndiff --git a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline.xcodeproj/project.pbxproj b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline.xcodeproj/project.pbxproj\nindex bc9ec3c..cfd307c 100644\n--- a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline.xcodeproj/project.pbxproj\n+++ b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline.xcodeproj/project.pbxproj\n@@ -3,7 +3,7 @@\n \tarchiveVersion = 1;\n \tclasses = {\n \t};\n-\tobjectVersion = 50;\n+\tobjectVersion = 51;\n \tobjects = {\n \n /* Begin PBXBuildFile section */\n@@ -30,6 +30,7 @@\n \t\t71499118C701BC0D345E612C /* Pods-YJTimeline.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YJTimeline.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YJTimeline/Pods-YJTimeline.debug.xcconfig"; sourceTree = "<group>"; };\n \t\t8224E29EAD46D2C5CBBA8B74 /* Pods-YJTimeline.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YJTimeline.release.xcconfig"; path = "Pods/Target Support Files/Pods-YJTimeline/Pods-YJTimeline.release.xcconfig"; sourceTree = "<group>"; };\n \t\t9B97168D0343DD805015C862 /* Pods_YJTimeline.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YJTimeline.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n+\t\tD47B6DF822CB30E1000F560B /* YJTimeline-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YJTimeline-Bridging-Header.h"; sourceTree = "<group>"; };\n /* End PBXFileReference section */\n \n /* Begin PBXFrameworksBuildPhase section */\n@@ -76,10 +77,11 @@\n \t\t\tchildren = (\n \t\t\t\t4AFF0B7B21F36CD800F4B46F /* AppDelegate.h */,\n \t\t\t\t4AFF0B7C21F36CD800F4B46F /* AppDelegate.m */,\n-\t\t\t\t4AFF0B7E21F36CD800F4B46F /* ViewController.h */,\n-\t\t\t\t4AFF0B7F21F36CD800F4B46F /* ViewController.m */,\n \t\t\t\t4AFF0B9321F36D1700F4B46F /* Resources */,\n \t\t\t\t4AFF0B9221F36D0700F4B46F /* Supporting Files */,\n+\t\t\t\t4AFF0B7E21F36CD800F4B46F /* ViewController.h */,\n+\t\t\t\t4AFF0B7F21F36CD800F4B46F /* ViewController.m */,\n+\t\t\t\tD47B6DF822CB30E1000F560B /* YJTimeline-Bridging-Header.h */,\n \t\t\t);\n \t\t\tpath = YJTimeline;\n \t\t\tsourceTree = "<group>";\n@@ -144,6 +146,7 @@\n \t\t\t\tTargetAttributes = {\n \t\t\t\t\t4AFF0B7721F36CD800F4B46F = {\n \t\t\t\t\t\tCreatedOnToolsVersion = 10.1;\n+\t\t\t\t\t\tLastSwiftMigration = 1020;\n \t\t\t\t\t};\n \t\t\t\t};\n \t\t\t};\n@@ -370,6 +373,7 @@\n \t\t\tbaseConfigurationReference = 71499118C701BC0D345E612C /* Pods-YJTimeline.debug.xcconfig */;\n \t\t\tbuildSettings = {\n \t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n+\t\t\t\tCLANG_ENABLE_MODULES = YES;\n \t\t\t\tCODE_SIGN_STYLE = Automatic;\n \t\t\t\tDEVELOPMENT_TEAM = Y5657739M7;\n \t\t\t\tINFOPLIST_FILE = YJTimeline/Info.plist;\n@@ -380,6 +384,9 @@\n \t\t\t\t);\n \t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = yjcocoa.YJTimeline;\n \t\t\t\tPRODUCT_NAME = "$(TARGET_NAME)";\n+\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = "YJTimeline/YJTimeline-Bridging-Header.h";\n+\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = "-Onone";\n+\t\t\t\tSWIFT_VERSION = 5.0;\n \t\t\t\tTARGETED_DEVICE_FAMILY = "1,2";\n \t\t\t};\n \t\t\tname = Debug;\n@@ -389,6 +396,7 @@\n \t\t\tbaseConfigurationReference = 8224E29EAD46D2C5CBBA8B74 /* Pods-YJTimeline.release.xcconfig */;\n \t\t\tbuildSettings = {\n \t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n+\t\t\t\tCLANG_ENABLE_MODULES = YES;\n \t\t\t\tCODE_SIGN_STYLE = Automatic;\n \t\t\t\tDEVELOPMENT_TEAM = Y5657739M7;\n \t\t\t\tINFOPLIST_FILE = YJTimeline/Info.plist;\n@@ -399,6 +407,8 @@\n \t\t\t\t);\n \t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = yjcocoa.YJTimeline;\n \t\t\t\tPRODUCT_NAME = "$(TARGET_NAME)";\n+\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = "YJTimeline/YJTimeline-Bridging-Header.h";\n+\t\t\t\tSWIFT_VERSION = 5.0;\n \t\t\t\tTARGETED_DEVICE_FAMILY = "1,2";\n \t\t\t};\n \t\t\tname = Release;\ndiff --git a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/AppDelegate.m b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/AppDelegate.m\nindex 109ea73..5524598 100644\n--- a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/AppDelegate.m\n+++ b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/AppDelegate.m\n@@ -7,7 +7,7 @@\n //\n \n #import "AppDelegate.h"\n-#import <YJCocoa/YJTimeline.h>\n+#import <YJCocoa/YJCocoa-Swift.h>\n \n @interface AppDelegate ()\n \n@@ -17,28 +17,28 @@\n \n \n - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n-    [YJTimeline addSteps:@"didFinishLaunchingWithOptions"];\n+    [YJTimeline addWithStep:@"didFinishLaunchingWithOptions"];\n     return YES;\n }\n \n \n - (void)applicationWillResignActive:(UIApplication *)application {\n-    [YJTimeline addSteps:@"applicationWillResignActive"];\n+    [YJTimeline addWithStep:@"applicationWillResignActive"];\n }\n \n \n - (void)applicationDidEnterBackground:(UIApplication *)application {\n-    [YJTimeline addSteps:@"applicationDidEnterBackground"];\n+    [YJTimeline addWithStep:@"applicationDidEnterBackground"];\n }\n \n \n - (void)applicationWillEnterForeground:(UIApplication *)application {\n-    [YJTimeline addSteps:@"applicationWillEnterForeground"];\n+    [YJTimeline addWithStep:@"applicationWillEnterForeground"];\n }\n \n \n - (void)applicationDidBecomeActive:(UIApplication *)application {\n-    [YJTimeline addSteps:@"applicationDidBecomeActive"];\n+    [YJTimeline addWithStep:@"applicationDidBecomeActive"];\n     [YJTimeline end];\n }\n \ndiff --git a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/ViewController.m b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/ViewController.m\nindex 79fc20c..e92742a 100644\n--- a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/ViewController.m\n+++ b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/ViewController.m\n@@ -7,7 +7,7 @@\n //\n \n #import "ViewController.h"\n-#import <YJCocoa/YJTimeline.h>\n+#import <YJCocoa/YJCocoa-Swift.h>\n \n @interface ViewController ()\n \n@@ -17,12 +17,12 @@\n \n - (void)viewDidLoad {\n     [super viewDidLoad];\n-    [YJTimeline addSteps:@"ViewController-viewDidLoad"];\n+    [YJTimeline addWithStep:@"ViewController-viewDidLoad"];\n }\n \n - (void)viewDidAppear:(BOOL)animated {\n     [super viewDidAppear:animated];\n-    [YJTimeline addSteps:@"ViewController-viewDidLoad"];\n+    [YJTimeline addWithStep:@"ViewController-viewDidLoad"];\n }\n \n @end\ndiff --git a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/YJTimeline-Bridging-Header.h b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/YJTimeline-Bridging-Header.h\nnew file mode 100644\nindex 0000000..1b2cb5d\n--- /dev/null\n+++ b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/YJTimeline-Bridging-Header.h\n@@ -0,0 +1,4 @@\n+//\n+//  Use this file to import your target\'s public headers that you would like to expose to Swift.\n+//\n+\ndiff --git a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/main.m b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/main.m\nindex ad2e93c..cb12e78 100644\n--- a/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/main.m\n+++ b/Demo/OC/DeveloperTools/YJTimeline/YJTimeline/main.m\n@@ -8,11 +8,11 @@\n \n #import <UIKit/UIKit.h>\n #import "AppDelegate.h"\n-#import <YJCocoa/YJTimeline.h>\n+#import <YJCocoa/YJCocoa-Swift.h>\n \n int main(int argc, char * argv[]) {\n     @autoreleasepool {\n-        [YJTimeline addSteps:@"main"];\n+        [YJTimeline addWithStep:@"main"];\n         return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));\n     }\n }\ndiff --git a/YJCocoa/Classes/DeveloperTools/Timeline/YJTimeline.swift b/YJCocoa/Classes/DeveloperTools/Timeline/YJTimeline.swift\nindex e301f36..5aac278 100644\n--- a/YJCocoa/Classes/DeveloperTools/Timeline/YJTimeline.swift\n+++ b/YJCocoa/Classes/DeveloperTools/Timeline/YJTimeline.swift\n@@ -8,18 +8,19 @@\n import UIKit\n \n /// 时间轴记录\n+@objcMembers\n public class YJTimeline: NSObject {\n     \n     static var log: String?\n     static var time: CFAbsoluteTime = 0\n     \n     /// 添加时间轴步骤\n-    public static func add(strp: String) {\n+    public static func add(step: String) {\n         if self.log == nil {\n-            self.log = strp\n+            self.log = step\n         } else {\n             let time = String(format: " %.3f", CFAbsoluteTimeGetCurrent() - self.time)\n-            self.log = self.log! + time + "\\n\\t" + strp\n+            self.log = self.log! + time + "\\n\\t" + step\n         }\n         self.time = CFAbsoluteTimeGetCurrent()\n     }\n', 'commit_subject': 'feat: YJTimeline 测试', 'repo_name': '937447974/YJCocoa', 'committer': {'name': '阳君', 'email': '49e480a18076ac624ab5fea2341da98665a4d1dd@qq.com', 'time_sec': '1562049089', 'tz_offset': '480', 'date': {'seconds': '1562049089'}}, 'commit_tree': '3524e0e698c34dfc95c16cef4642b744f98c3a71', 'commit_message': 'feat: YJTimeline 测试\n', 'language_name': 'Swift', 'license': 'mit', 'hunks': '@@ -8,18 +8,19 @@\n import UIKit\n \n /// 时间轴记录\n+@objcMembers\n public class YJTimeline: NSObject {\n     \n     static var log: String?\n     static var time: CFAbsoluteTime = 0\n     \n     /// 添加时间轴步骤\n-    public static func add(strp: String) {\n+    public static func add(step: String) {\n         if self.log == nil {\n-            self.log = strp\n+            self.log = step\n         } else {\n             let time = String(format: " %.3f", CFAbsoluteTimeGetCurrent() - self.time)\n-            self.log = self.log! + time + "\\n\\t" + strp\n+            self.log = self.log! + time + "\\n\\t" + step\n         }\n         self.time = CFAbsoluteTimeGetCurrent()\n     }\n', 'addition_count': 4, 'deletion_count': 3, 'src_file': 'a/YJCocoa/Classes/DeveloperTools/Timeline/YJTimeline.swift', 'tgt_file': 'b/YJCocoa/Classes/DeveloperTools/Timeline/YJTimeline.swift', 'file_extension': '.swift', 'before_file': '//\n//  YJTimeline.swift\n//  YJCocoa\n//\n//  HomePage:https://github.com/937447974/YJCocoa\n//  YJ技术支持群:557445088\n//\nimport UIKit\n\n/// 时间轴记录\npublic class YJTimeline: NSObject {\n    \n    static var log: String?\n    static var time: CFAbsoluteTime = 0\n    \n    /// 添加时间轴步骤\n    public static func add(strp: String) {\n        if self.log == nil {\n            self.log = strp\n        } else {\n            let time = String(format: " %.3f", CFAbsoluteTimeGetCurrent() - self.time)\n            self.log = self.log! + time + "\\n\\t" + strp\n        }\n        self.time = CFAbsoluteTimeGetCurrent()\n    }\n            self.log = self.log! + time + "\\n\\t" + step\n        }\n        self.time = CFAbsoluteTimeGetCurrent()\n    }\n    \n    /// 结束并打印日志\n    public static func end() {\n        guard let log = self.log else {\n            return\n        }\n        let time = String(format: " %.3f", CFAbsoluteTimeGetCurrent() - self.time)\n        YJLogDebug(log + time)\n        self.log = nil\n    }\n    \n}\n', 'message': 'feat: YJTimeline 测试\n', 'author_name': '阳君', 'lang': 'swift'}