On 6 Sep 2005 23:44:17 -0700, Alex wrote:
> Simplified example of what's happening:
> System.currentTimeMillis() gives me lets say 1000, 1001, 1002, 1003
> etc. and then suddenly 1000 again. It's the same thread. It's not just
> a delay because of the buffer problems. It literally goes back in time
>
> I use System.out.prinln() to print time.
>
> I can't even imagine what might cause this.
Another process changing the system time.
On Unix, ntp does this transparently without causing the time to jump
or go backwards.
On Windows, I have no idea but it wouldn't surprise me if
"automatically synchronize time with an internet server" made that
kind of periodic adjustment.
On the other hand, there could very well be something wrong with the
code you neglected to post.
In any case, I seriously doubt that System.currentTimeMillis() itself
is the problem.
/gordon
--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e