开发者

Determine memory consumption

开发者 https://www.devze.com 2023-02-28 04:51 出处:网络
In C++, with this: std::time_t first= time(NULL); /* .. code .. */ std::time_t second = time(NULL); s开发者_JS百科td::cout << \"Seg : \" << difftime(second,first) << std::endl;

In C++, with this:

std::time_t first  = time(NULL);
/* .. code .. */
std::time_t second = time(NULL);

s开发者_JS百科td::cout << "Seg : " << difftime(second,first) << std::endl; 

I can determine my program's execution duration.

Can I determine its memory consumption at different points through the program?


Not easily.

0

精彩评论

暂无评论...
验证码 换一张
取 消