• Post Reply Bookmark Topic Watch Topic
  • New Topic

Does this happen just on windows

 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a thread which prints the current millis on the console using, System.currentTimeMillis(). Its running fine and keep on printing the same value atleast 20-25 times.

I just made the thread to wait for 1 millisecond. But it isn't incrementing 1 to the previous value. When I changed it to wait for 20 milliseconds then it is working fine and incrementing approx 20 to the previous value.

Moreover, when I query my ORACLE database via a SQL query. It always prints 000 as nanoseconds. Why? ORACLE server is also on windows machine.

Is it something about 32bit or 64bit operating system? Is it because of Windows?
[ May 10, 2005: Message edited by: Adeel Ansari ]
 
Timmy Marks
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this, but I don't vouch for its accuracy.



Operating systems granularity:
Windows 95/98: 50 milliseconds
Windows NT/2000: 10 milliseconds
Linux: 1 millisecond (can get finer resolution in some versions´┐Ż-
nanoseconds)
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Timmy.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!