Ilya PA

Greenhorn
+ Follow
since Aug 30, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ilya PA

Hi Navi,
Actually as far as i know you can synchronize a variable. U can do that placing the 'volatile' keyword before a variable's name. This is often used with variables of size bigger then a CPU word size. For example normal PIII word size is 32bits, but variables of type long and double are 64bit vars. So when one thread loads a part of a long var to the cpu(first 32bits), another thread should not be able to access that variable.
Hi, I'm wrighting a program where i have to start a thread, then kill it by command and start again. Is there any way to do that? Is there anything like the depricated stop() method?
Thanx alot, that bit of code was of great help~! It pointed me out my mistake of getting only one instance of calendar and then enquiring it for time, but i should have gotten a new instance each time!
19 years ago
Hi,
I'm wrighting a program that requires accurate readings from the system clock... is there an way to do it? I was trying to use the java.util.Calendar class, as follows:
...
Calendar clock=Calendar.getInstance();
long time=clock.getTimeInMillis();
...
But if i try to check the time in the same method again it gives me the same result... How come? Is there a way to overcome this?
19 years ago