when “am start” a activity,what the “total time” mean?

房东的猫 提交于 2020-01-04 02:15:27

问题


I launch a activity use:

am start -W -n

The console output:

tangbincheng@tangbinchengdeMacBook-Pro:~$ adb shell

shell@hwp6-t00:/ $ su

root@hwp6-t00:/ # am start -W -n com.book2345.reader/com.book2345.reader.MainA>

Starting: Intent { cmp=com.book2345.reader/.MainActivity }

Status: ok

Activity: com.book2345.reader/.MainActivity

ThisTime: 1554

TotalTime: 42815

Complete

what the ThisTime and the TotalTime mean?


回答1:


search in android source code: You can find "thisTime/totalTime"

"thisTime": just current activity launched time

"totalTime":the activity you started may be on the bottom of activity stack. So it refers to the total time from activity searching to current activity launched.

final long thisTime = curTime - displayStartTime;
final long totalTime = stack.mLaunchStartTime != 0
        ? (curTime - stack.mLaunchStartTime) : thisTime;


来源:https://stackoverflow.com/questions/27736882/when-am-start-a-activity-what-the-total-time-mean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!