2013年9月20日星期五

Date () method exception

					System.out.println(timeFmt.format(new Date()) + " " + String.valueOf(interval));
Thread.sleep(60000);


This is the statement inside the loop , the output is
12:09:51 0
12:09:51 1
12:09:51 2
12:09:51 3
12:09:51 4
12:09:51 5
12:09:51 6
12:09:51 7

why the output of the time in question ? interval is the number of minutes.
And when I put the interval to 30,000 , no problem , the output is
12:09:06 0
12:09:36 0
12:09:06 1

normal
------ Solution ----------------------------------- ---------
not understand , in the end what is the problem ?

Why been 12:09 minutes ?
12:09:06 0
12:09:36 0
12:09:06 1
------ For reference only --------------------------- ------------
- ~ ~ Well, the output is not changed even after normal
13:09:34 0
13:09:04 0
13:09:34 1
13:09:04 1
13:09:34 2
13:09:04 2
13:09:34 3
13:09:04 3
13:09:34 4
13:09:04 4
13:09:34 5
13:09:04 5
13:09:34 6
13:09:04 6
13:09:34 7
13:09:04 7
13:09:34 8
13:09:04 8
13:09:34 9
13:09:04 9
13:09:34 10
13:09:04 10
13:09:34 11
13:09:04 11
13:09:34 12

没有评论:

发表评论