Logcat中显示的时间 [英] Time displayed in Logcat

查看:561
本文介绍了Logcat中显示的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以hh:mm:ss:SS格式获取Android设备时间戳.我可以查看Eclipse的Logcat中显示的时间.是计算机时间还是Android设备时间?

I need to get the Android device timestamp in the format hh:mm:ss:SS. I am able to view the time displayed in the Logcat of Eclipse. Is it the computer's time or is it the Android device's time?

推荐答案

如果您在Android设备上运行应用程序,则它将打印设备的时间,如果在模拟器上,则将显示计算机的时间.

If you are running your app on Android device then it will print device's time, if on emulator then it will show computer's time.

为确保只将日志的时间与设备的时间和计算机的时间相匹配,您会找到答案.

To be ensure just match the Log's time with device's time and with computer's time you will find your answer..

这篇关于Logcat中显示的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆