Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nigel Wade Newsgroups: comp.lang.java.programmer Subject: Re: VERY PECULIAR PROBLEM Date: Fri, 13 Mar 2015 09:36:48 +0000 Lines: 8 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net pvujG9cXylG6nNjlGob0aw36h5Xsw/vaTsBPd3fS+hkT+CAxJw Cancel-Lock: sha1:jlROj5zFTMOQTYSHVFTfnMIHZYI= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:31318 My guess, and it has to be a guess because of the total lack of information as others have highlighted, is that your code (the *other* code, which you don't show) "doesn't count time" because it's running in another thread which isn't synchronized properly. The code you've shown is a tight, CPU bound, loop so I guess the other thread is starved of CPU cycles. Add your System.out and the tight loop becomes I/O bound, allowing the other thread to gain CPU cycles. All complete conjecture based on a complete lack of information.