forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp.java
More file actions
34 lines (27 loc) · 760 Bytes
/
temp.java
File metadata and controls
34 lines (27 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.wgh.action;
import com.wgh.core.ChStr;
public class temp {
/**
* @param args
*/
public static void main(String[] args) {
ChStr chStr=new ChStr();
// TODO ×Ô¶¯Éú³É·½·¨´æ¸ù
long a=new java.util.Date().getTime();
System.out.println(a);
long sum=0;
for(long i=0;i<1000000000;i++){
sum=sum+i;
}
long b=new java.util.Date().getTime();
System.out.println(b);
System.out.println(b-a);
int h=(int)Math.abs((b-a+10000)/3600000);
String hour=chStr.formatNO(h,2);
int m=(int)(b-a+10000)%3600000/60000;
String minute=chStr.formatNO(m,2);
int s=(int)((b-a+10000)%3600000)%60000/1000;
String second=chStr.formatNO(s,2);
System.out.println(hour+":"+minute+":"+second);
}
}