当“上午开始”时一项活动,“总时间”意思? [英] when "am start" a activity,what the "total time" mean?
本文介绍了当“上午开始”时一项活动,“总时间”意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我启动活动用途:
am start -W -n
控制台输出:
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
ThisTime
和 TotalTime
是什么意思?
推荐答案
在Android源代码中进行搜索:
您可以找到 thisTime / totalTime
search in android source code: You can find "thisTime/totalTime"
thisTime :刚刚当前活动的启动时间
"thisTime": just current activity launched time
totalTime :您开始的活动可能在活动堆栈的底部。因此,它是指从活动搜索到当前活动启动的总时间。
"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;
这篇关于当“上午开始”时一项活动,“总时间”意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文