打印时间(MS级别)
发布日期:2021-06-30 18:52:36 浏览次数:2 分类:技术文章

本文共 2155 字,大约阅读时间需要 7 分钟。

--- a/android-lte/packages/apps/Camera/src/com/android/camera/Camera.java+++ b/android-lte/packages/apps/Camera/src/com/android/camera/Camera.java@@ -64,6 +64,9 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast;+import java.text.SimpleDateFormat;//owen.wei modify+import java.util.Date;//owen.wei modify+import android.text.format.DateFormat;//owen.wei modify import com.android.camera.ui.CameraPicker; import com.android.camera.ui.FaceView;@@ -397,7 +400,13 @@ public class Camera extends ActivityBase implements FocusManager.Listener,                 // We need to check whether the activity is paused before long                 // operations to ensure that onPause() can be done ASAP.                 if (mCancelled) return;+                //owen.wei modify add start+                                                               SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");+                                                               Date   curDate   =   new   Date(System.currentTimeMillis());+                 mCameraDevice = Util.openCamera(Camera.this, mCameraId);++                 mParameters = mCameraDevice.getParameters();                 // Wait until all the initialization needed by startPreview are                 // done.@@ -410,6 +419,10 @@ public class Camera extends ActivityBase implements FocusManager.Listener,                 mHandler.sendEmptyMessage(CAMERA_OPEN_DONE);                 if (mCancelled) return;                 startPreview();+                Date   endDate   =   new   Date(System.currentTimeMillis());+                                                               long diff = endDate.getTime() - curDate.getTime();+                                                               Log.e(TAG, "curDate:"+String.valueOf(curDate)+"\nendDate:"+String.valueOf(endDate)+"\ndiff+                //owen.wei modify add end                 mHandler.sendEmptyMessage(START_PREVIEW_DONE);                 mOnResumeTime = SystemClock.uptimeMillis();                 mHandler.sendEmptyMessage(CHECK_DISPLAY_ROTATION);

转载地址:https://linus.blog.csdn.net/article/details/43154645 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:linux驱动里获取时间差
下一篇:加速度传感器测试APP

发表评论

最新留言

路过,博主的博客真漂亮。。
[***.116.15.85]2024年04月07日 21时13分07秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章