Examples of Timer


Examples of com.dmissoh.biologic.time.Timer

    Label timeElapsedLabelText = new Label(timeComposite, SWT.NONE);
    timeElapsedLabelText.setText("Elapsed time: ");
    final Label timeElapsedLabel = new Label(timeComposite, SWT.NONE);
    timeElapsedLabel.setLayoutData(gridData);

    timer = new Timer(currentTimeLabelTextField, timeElapsedLabel,
        getControl().getShell(), isLive());
    timerThread = new Thread(timer);
  }
View Full Code Here

Examples of com.golden.gamedev.object.Timer

    public Robot (BufferedImage[] images, double x, double y, Player player, int health, LixoGame game)
    {
       super(images,x,y, player);
       this.health = health;
       this.spriteSheet = images;
       bulletTimer = new Timer(PlayerConstants.BulletTimer);
       bulletTimer.setActive(false);
       moveTimer = new Timer(100);
       moveTimer.setActive(false);
       deathTimer = new Timer(200);
       deathTimer.setActive(false);
       state = RobotState.Searching;
       radius = 150.0;
       this.game = game;
View Full Code Here

Examples of com.google.code.http4j.utils.Timer

  @Override
  public final Connection acquire(Host host) throws InterruptedException, IOException {
    if(!shutdown.get()) {
      increaseUsed(host);
      Timer blockingTimer = ThreadLocalMetricsRecorder.getInstance().getBlockingTimer();
      blockingTimer.start();
      Connection connection = getConnection(host);
      blockingTimer.stop();
      return connection;
    }
    return null;
  }
View Full Code Here

Examples of com.google.gwt.user.client.Timer

       * instead of creating a task per entry. Then, we could have one recurring task per map (which
       * would clean the entire map and then reschedule itself depending upon when the next
       * expiration comes). We also want to avoid removing an entry prematurely if the entry was set
       * to the same value again.
       */
      Timer timer = new Timer() {
        @Override
        public void run() {
          remove(key, value);
        }
      };
      timer.schedule((int) expirationMillis);
    }
View Full Code Here

Examples of com.google.javascript.jscomp.parsing.parser.util.Timer

    return commentRecorder.getComments();
  }

  // 14 Program
  public ProgramTree parseProgram() {
    Timer t = new Timer("Parse Program");
    try {
      SourcePosition start = getTreeStartLocation();
      ImmutableList<ParseTree> sourceElements = parseGlobalSourceElements();
      eat(TokenType.END_OF_FILE);
      t.end();
      return new ProgramTree(
          getTreeLocation(start), sourceElements, commentRecorder.getComments());
    } catch (StackOverflowError e) {
      reportError("Too deep recursion while parsing");
      return null;
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.Timer

   * @param activated
   */
  public Shooter(World world, NextShape shape, float shotInterval,
      boolean activated) {
    super(world, shape, Masses.NO_MASS);
    this.timeToNextShot = new Timer(shotInterval);
    if (activated) {
      this.timeToNextShot.start();
    }
  }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.util.Timer

    {
        this.log = log ;
        this.label = label ;
        this.tickPoint = tickPoint ;
        this.superTick = superTick ;
        this.timer = new Timer() ;
    }
View Full Code Here

Examples of com.impossibl.postgres.utils.Timer

  }

  @Test
  public void testLargeResultSet() throws Exception {

    Timer timer = new Timer();

    for (int c = 0; c < 100; ++c) {

      try (Statement st = conn.createStatement()) {

        try (ResultSet rs = st.executeQuery("SELECT id, md5(random()::text) AS descr FROM (SELECT * FROM generate_series(1,100000) AS id) AS x;")) {

          while (rs.next()) {
            rs.getString(1);
          }

        }

      }

      System.out.println("Query Time:" + timer.getLapSeconds());
    }

  }
View Full Code Here

Examples of com.intel.hadoop.graphbuilder.util.Timer

    String rawgraph = output + "/graph_raw";
    String normedgraph = output + "/graph_norm";
    String partitionedgraph = output + "/graph_partitioned";

    Timer timer = new Timer();
    timer.start();
    try {
      new CreateLinkGraph().main(new String[] { rawinput, rawgraph });
      LOG.info("Create graph finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    try {
    new NormalizeGraphIds().main(new String[] { rawgraph, normedgraph });
    LOG.info("Normalize graph finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    try {
    new PartitionGraph().main(new String[] { String.valueOf(npart),
        normedgraph, partitionedgraph });
    LOG.info("Partition graph finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    LOG.info("Total flow time : " + timer.current_time() + " seconds");
  }
View Full Code Here

Examples of com.jme3.system.Timer

      if (fs.isDirectory())
        convert(fs);
  }

  public int convertNav(File from) throws Throwable {
    Timer t = new NanoTimer();
    float time = 0f;

    // new loader each time, yes
    try {
      Geometry g;
      // need to load vial loadModel, JME does not see obj, etc as
      // Assets..
      t.reset();
      Spatial n = (Spatial) assetMan.loadModel(from.getAbsolutePath());
      time = t.getTimeInSeconds();
      System.out.println("File " + from.getAbsolutePath() + " loaded in "
          + time + " seconds");
      if (n instanceof Geometry) {
        g = (Geometry) n;
        n = new Node(g.getName());
        ((Node)n).attachChild(g);
      } else if (n instanceof Node) {
        if (((Node) n).getChildren().size() > 1)
          throw new Throwable(
              "Mesh with more children detected than one on "
                  + from.getName());
        g = (Geometry) ((Node) n).getChild(0);
      } else
        throw new Throwable("Spatial loaded was unexpected type "
            + n.getClass());
      // jme fucked up the model names, and ignores any object name
      // entries so we fix a bit
      String fName = from.getName().substring(0,
          from.getName().length() - fileEnding.length());// without .nav
      g.setName(fName.toLowerCase());
      TiledNavMesh navMesh = new TiledNavMesh();

      {
      String[] xy = from.getParentFile().getName().split("_");
      // l2j's center is in x between region 19 (-32768) and 20 (+32768)
      // and in y between region 18 (+32768) and 17 (-32768)
     
      // minus 20*2048, 20 because region count starts with 0_0,
      // 2048 because one region consists of 8x8 tiles (each 256x256 long)
      int xd = (Integer.parseInt(xy[0]) * 256) - (20 * 2048);
      // minus 18*2048
      int yd = (Integer.parseInt(xy[1])) * 256 - (18 * 2048);
     
      // center is in top left corner for nav mesh to be consistent with
      // this for borders move x right, move y up by half size
      Vector3f offset = new Vector3f(xd + 128, 0, yd - 128);
      System.out.println("Offset for "+from.getParentFile().getName()+"/nav2.obj should be at:"+offset);
      }
     
      navMesh.loadFromMesh(g.getMesh(), Vector3f.ZERO, isMeshRelative);
     
      time = t.getTimeInSeconds();
      System.out.println("File " + from.getAbsolutePath()
          + " converted in " + time + " seconds");
      String path = from.getAbsolutePath();
      String parent = from.getParent();
      // replace .nav with .jnv
      t.reset();
      BinaryExporter.getInstance().save(navMesh,
          new File(parent+"/nav.jnv"));
      time = t.getTimeInSeconds();
//      System.out.println("File "+parent+"/nav.jnv saved in "
//          + time + " seconds");
//      t.reset();
//      writeMeshToObjFile(mesh,
//          new File(parent+"/nav.obj"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.