Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ductsim;
- import java.io.BufferedWriter;
- import java.io.File;
- import java.io.FileWriter;
- import java.io.IOException;
- import java.util.ArrayList;
- import java.util.List;
- import java.util.concurrent.ThreadLocalRandom;
- /**
- *
- * @author Santiago
- */
- public class test2 {
- public static void main(String[] args)
- {
- int nGens = 5000;
- double startTime, endTime, duration1, duration2, duration4;
- startTime = System.nanoTime();
- Duct duct1 = new Duct(200, 10, true, 2); // Last arg. = number of threads
- duct1.execute(nGens);
- endTime = System.nanoTime();
- duration1 = (endTime - startTime);
- System.out.println("Parallel: " + duration1/ 1000000000.0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement