Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何测量创建对话框所需的时间? 我是在开始时在演员中做,然后在结束时做吗?那会是正确的吗?
这取决于您是否只想在整个链的构造函数中编写代码,包括分配和父类初始化。
如果你想要所有,包括可能的继承链,那么你需要在创建你的类时这样做:
clock_t start = clock(); CMyDialog *myDlg = new CMyDialog; clock_t end = clock();