tasklist

How to convert a tasklist's CPU time to CPU % usage?

萝らか妹 提交于 2019-11-28 10:03:27
I'm trying to use tasklist to find out which process is consuming more than X percent of my CPU (to later kill it with taskkill .) How do I know what percent a time format represents? The documentations says: TASKLIST options /FI filter And one filter may be: CPUTIME eq, ne, gt, lt, ge, le CPU time in the format: hh:mm:ss. hh - number of hours, mm - minutes, ss - seconds If I try tasklist /FI "CPUTIME gt 00:00:10" it works. But if I tasklist /FI "CPUTIME gt 90" it doesn't. How can I know that time format represent 90%? Or 80%? What's the relationship between CPU usage time and the CPU usage

Android, how to clear the recent task list which could get from Home button in most phone? Reflection is a possible way?

二次信任 提交于 2019-11-27 23:05:54
I'm writing a Launcher, it need clear the recent app/task list from system, not "didn't show my apps in recent tasks list", but I have no idea about it now. I have searched in the stackoverflow and only this issue is matched but the answer has no any help. Some other guy has asked the same questions, he metioned the RemoveTask which comes from Android 4.0. Yes, I have checked the source code of Android 2.3.7 and Android 4.0, at a round estimated, I think I could almost reach the end point if I can erase the list of mRecentTasks which defined in ActivityMangerService.Java : final ArrayList