Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static List<Packet> packets = new LinkedList<Packet>();
- public static void main(String[] args) {
- for (int i = 0; i < 10000; i++) {
- packets.add(new Packet());
- }
- long time = System.nanoTime();
- for (int i = 0; i < 100000; i++) {
- try {
- Thread.sleep(50);
- } catch (Throwable t) {
- }
- onTick();
- }
- System.out.println(time);
- }
- private static void onTick() {
- for (Packet packet : packets) {
- packet.getO();
- packet.getX();
- packet.getY();
- packet.getZ();
- }
- }
Add Comment
Please, Sign In to add comment