瀏覽代碼

add debug lines to stop getChatlist timing

B. Petersen 4 年之前
父節點
當前提交
2bc920f7be
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      DcCore/DcCore/DC/Wrapper.swift

+ 3 - 0
DcCore/DcCore/DC/Wrapper.swift

@@ -92,8 +92,11 @@ public class DcContext {
     }
 
     public func getChatlist(flags: Int32, queryString: String?, queryId: Int) -> DcChatlist {
+        let start = CFAbsoluteTimeGetCurrent()
         let chatlistPointer = dc_get_chatlist(contextPointer, flags, queryString, UInt32(queryId))
         let chatlist = DcChatlist(chatListPointer: chatlistPointer)
+        let diff = CFAbsoluteTimeGetCurrent() - start
+        logger?.info("⏰ getChatlist: \(diff) s")
         return chatlist
     }