org.jgroups.util.Util.micros()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(165)

本文整理了Java中org.jgroups.util.Util.micros()方法的一些代码示例,展示了Util.micros()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.micros()方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:micros

Util.micros介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

protected static long time(boolean use_ms) {return use_ms? System.currentTimeMillis() : Util.micros();}
protected String unit() {return use_ms? "ms" : "us";}

代码示例来源:origin: wildfly/wildfly

public Object up(Message msg) {
  long start=Util.micros();
  try {
    return up_prot.up(msg);
  }
  finally {
    long time=Util.micros()-start;
    delivery_times.add(time);
  }
}

代码示例来源:origin: wildfly/wildfly

public void up(MessageBatch batch) {
    // int batch_size=batch.size();
    long start=Util.micros();
    try {
      up_prot.up(batch);
    }
    finally {
      long time=Util.micros()-start;
      //if(batch_size > 1)
       //  time/=batch_size; // cannot use batch.size() as message might have been removed from the batch!
      delivery_times.add(time);
    }
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected static long time(boolean use_ms) {return use_ms? System.currentTimeMillis() : Util.micros();}
protected String unit() {return use_ms? "ms" : "us";}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public Object up(Message msg) {
  long start=Util.micros();
  try {
    return up_prot.up(msg);
  }
  finally {
    long time=Util.micros()-start;
    delivery_times.add(time);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void up(MessageBatch batch) {
    // int batch_size=batch.size();
    long start=Util.micros();
    try {
      up_prot.up(batch);
    }
    finally {
      long time=Util.micros()-start;
      //if(batch_size > 1)
       //  time/=batch_size; // cannot use batch.size() as message might have been removed from the batch!
      delivery_times.add(time);
    }
  }
}

相关文章

Util类方法