source: benchmark/creation/JavaThread.java @ 28af389

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 28af389 was bf71cfd, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Moved up many directories in source

  • Property mode set to 100644
File size: 462 bytes
RevLine 
[50abab9]1public class JavaThread {
2        public static class MyThread extends Thread {
3                @Override
4                public void run() {}
5        }
6
7        public static void main(String[] args) throws InterruptedException {
8                int NoOfTimes = 50000;
9                long start = System.nanoTime();
10                for(int i = 1; i <= NoOfTimes; i += 1) {
11                        JavaThread.MyThread m = new JavaThread.MyThread();
12                        m.start();
13                        m.join();
14                }
15                long end = System.nanoTime();
16                System.out.println( (end - start) / NoOfTimes);
17        }
18}
Note: See TracBrowser for help on using the repository browser.