Wallpaper_Home/wallpaper_project/Tool/DTOtherMacro.swift
2024-07-15 11:54:44 +08:00

29 lines
813 B
Swift
Executable File

//
// DTOtherMacro.swift
//
//
// Created by on 2017/11/8.
// Copyright © 2017 . All rights reserved.
//
import Foundation
extension DateFormatter {
class func private_new() -> DateFormatter {
let fmt = DateFormatter.init()
fmt.dateFormat = "HH:mm:ss.sss"
return fmt
}
}
private let formatter = DateFormatter.private_new()
///
//public func DTLog(_ format: String, _ args: CVarArg..., file : String = #file, line : UInt = #line) {
// #if DEBUG
// DTLog("\(Thread.isMainThread ? "[Main]" : "[Child]")\((file as NSString).lastPathComponent.replacingOccurrences(of: ".swift", with: ""))[\(line)][\(formatter.string(from: Date.init()))]:\(String.init(format: format, arguments: args))")
// #endif
//}