Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- code:
- string16 TaskManagerModel::GetResourceCPUUsage(int index) const {
- CHECK_LT(index, ResourceCount());
- std::string foo = UTF16ToUTF8(WideToUTF16Hack(StringPrintf(L"%.0f", GetCPUUsage(resources_[index]))));
- printf("%s: [%.0f], [%s]\n", __PRETTY_FUNCTION__, GetCPUUsage(resources_[index]), foo.c_str());
- return WideToUTF16Hack(StringPrintf(
- #if defined(OS_MACOSX)
- // Activity Monitor shows %cpu with one decimal digit -- be
- // consistent with that.
- L"%.1f",
- #else
- L"%.0f",
- #endif
- GetCPUUsage(resources_[index])));
- }
- result:
- string16 TaskManagerModel::GetResourceCPUUsage(int) const: [3], []
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement