Browse Source

add debug lines to stop getChatlist timing

B. Petersen 4 năm trước cách đây
mục cha
commit
2bc920f7be
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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
     }