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.
精彩评论