java中的时间

来源:互联网 发布:apache下载64位安装版 编辑:程序博客网 时间:2024/05/29 12:23
                long now = android.os.SystemClock.uptimeMillis();
                AspLog.d(TAG, "now--"+String.valueOf(now));
/*                long currentSeconds = System.currentTimeMillis()/1000;
                long currentthree = System.currentTimeMillis();
                AspLog.d(TAG, "now--"+String.valueOf(now));
                AspLog.d(TAG, "currentSeconds--"+String.valueOf(currentSeconds));
                AspLog.d(TAG, "currentthree--"+String.valueOf(currentthree));
                
                SimpleDateFormat   formatter=new SimpleDateFormat("yyyyMMddHHmmss");
                  Date curDate=new  Date(System.currentTimeMillis());//获取当前时间     
                  String str=formatter.format(curDate);
                  AspLog.d(TAG, "str--"+String.valueOf(str));
                  

                SimpleDateFormat   haha=new SimpleDateFormat("MM月dd日 HH:mm");
                  Date hahahha=new  Date(System.currentTimeMillis());//获取当前时间     
                  String hahhahaha=formatter.format(hahahha);
                  AspLog.d(TAG, "hahhahaha--"+String.valueOf(hahhahaha));*/
原创粉丝点击