Все вопросы: [nanotime]

4 вопросов

похожие теги:
2
голосов
3ответов
1975 просмотров

System.nanotime running slow?

One of my friends showed me something he had done, and I was at a serious loss to explain how this could have happened: he was using a System.nanotime to time something, and it gave the user an update every second to tell how much time had elapsed (it Thread.sleep(1000) for that part), and it too...

18
голосов
7ответов
21763 просмотров

What is the equivalent to System.nanoTime() in .NET?

The title is pretty much self-explanatory, I'm killing myself over this simplicity. Looked here, but it isn't much helpful.

1
голосов
2ответов
1242 просмотров

strace java applet

I'm trying to strace a java applet, and strace doesn't seem to be working. I'm calling the following function. public static void testSTrace(){ long c = 0; for (int i = 0; i < 1000; i++){ long start = System.nanoTime(); try{Thread.sleep(0, 100);}catch(Exception e){/*c...

154
голосов
15ответов
113473 просмотров

System.nanoTime () совершенно бесполезен?

Как указано в сообщении блога Остерегайтесь System.nanoTime () в Java , в системах x86 Java System.nanoTime () возвращает значение времени с помощью CPU счетчик. Теперь рассмотрим следующий случай, который я использую для измерения времени звонка: long time1= System.nanoTime(); foo(); lo...