org.skife.config.TimeSpan.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(104)

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

TimeSpan.<init>介绍

暂无

代码示例

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

@Override
  public TimeSpan apply(final String input) {
    return new TimeSpan(input);
  }
};

代码示例来源:origin: stackoverflow.com

WebDriver _driver = new WebDriver();
WebDriverWait _wait = new WebDriverWait(_driver, new TimeSpan(0, 1, 0));

_wait.Until(d => d.FindElement(By.Id("Id_Your_UIElement"));

代码示例来源:origin: stackoverflow.com

protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
  DateTime input = Calendar1.SelectedDate;
  int delta = DayOfWeek.Sunday - input.DayOfWeek;
  DateTime firstDay = input.AddDays(delta);

  for (int i = 0; i < 7; i++)
   Label1.Text += ((DateTime)(firstDay.Add(new TimeSpan(i, 0, 0, 0)))).ToShortDateString() + " -- ";
}

代码示例来源:origin: com.fasterxml.clustermate/clustermate-service

public DeferredDeleteConfig() {
    this(5, 100, DEFAULT_TARGET_DELAY,
        new TimeSpan(2500, TimeUnit.MILLISECONDS)
        // !!! TEST
//        new TimeSpan(1000, TimeUnit.MILLISECONDS)
      );
  }

代码示例来源:origin: stackoverflow.com

interface ISixty
 {
   DateTime SixtyDaysFromNow();
 }
 public class Foo : ISixty
 {
   public DateTime SixtyDaysFromNow()
   {
     return DateTime.Now + new TimeSpan(60,0,0,0);
   }
 }

代码示例来源:origin: stackoverflow.com

public static long ToMillisecondsSinceUnixEpoch(DateTime dateTime)
{
  DateTimeOffset offset = new DateTimeOffset(dateTime, new TimeSpan(1,0,0));
  return (long)(offset - UnixEpoch()).TotalMilliseconds;
}

代码示例来源:origin: com.fasterxml.clustermate/clustermate-service

public ServiceConfig overrideSyncGracePeriod(String periodDesc) {
  try {
    cfgSyncGracePeriod = new TimeSpan(periodDesc);
  } catch (Exception e) {
    throw new IllegalArgumentException("Invalid delay definition '"+periodDesc+"': "+e.getMessage());
  }
  return this;
}

代码示例来源:origin: stackoverflow.com

var browser = new ChromeDriver();
var navigator = browser.Navigate();

// Currently, max execution time is one minute.
browser.Manage().Timeouts()
    .SetScriptTimeout(new TimeSpan(0, 1, 0));

代码示例来源:origin: stackoverflow.com

public void OnCreate()
 {
   Worker ();
 }
 async void Worker ()
 {
   while (true) {
     await Task.Delay (new TimeSpan (1, 0, 0)).ConfigureAwait (false);
     Console.WriteLine ("Do stuff!");
   }
 }

代码示例来源:origin: org.kill-bill.commons/killbill-queue

@Override
public TimeSpan getReapThreshold() {
  return new TimeSpan(5, TimeUnit.MINUTES);
}

代码示例来源:origin: com.ning.billing/killbill-meter

private DecimatingSampleFilter createDecimatingSampleFilter(final Integer outputCount, final DecimationMode decimationMode, final DateTime startTime, final DateTime endTime) {
    final DecimatingSampleFilter rangeSampleProcessor;
    if (outputCount == null) {
      rangeSampleProcessor = null;
    } else {
      // TODO Fix the polling interval
      rangeSampleProcessor = new DecimatingSampleFilter(startTime, endTime, outputCount, new TimeSpan("1s"), decimationMode, new CSVSampleProcessor());
    }

    return rangeSampleProcessor;
  }
}

代码示例来源:origin: com.nesscomputing.service.discovery/discovery-client

/**
 * Default penalty time for a bad node read from service discovery.
 */
@Config("ness.discovery.penalty-time")
@Default("600s")
public TimeSpan getPenaltyTime()
{
  return new TimeSpan(600, TimeUnit.SECONDS);
}

代码示例来源:origin: com.nesscomputing.components/ness-jms

/**
 * If the topic is connected, the message callback will be called after this many millis, no matter whether a message was
 * received or not.
 */
@Config({"ness.jms.${name}.tick-timeout", "ness.jms.tick-timeout"})
@Default("5s")
public TimeSpan getTickTimeout()
{
  return new TimeSpan("5s");
}

代码示例来源:origin: com.nesscomputing.components/ness-httpclient

/**
 * Default is 15000 (15 seconds).
 *
 * @return Timeout for an established connection in keep-alive until it is closed. If 0,
 *         connections are closed immediately.
 */
@Config({"ness.httpclient.${httpclient_name}.idle-timeout", "ness.httpclient.idle-timeout"})
@Default("15s")
public TimeSpan getIdleTimeout()
{
  return new TimeSpan(15, TimeUnit.SECONDS);
}

代码示例来源:origin: com.nesscomputing.components/ness-amqp

/**
 * Maximum amount of time that the transmitter tries to
 * enqueue an event onto the exchange or queue before it
 * gives up and drops the event.
 */
@Config({"ness.amqp.${name}.transmit-timeout", "ness.amqp.transmit-timeout"})
@Default("10ms")
public TimeSpan getTransmitTimeout()
{
  return new TimeSpan("10ms");
}

代码示例来源:origin: com.nesscomputing.service.discovery/discovery-client

/**
 * Default timeout for zookeeper related operations.
 */
@Config("ness.discovery.zookeeper-timeout")
@Default("500ms")
public TimeSpan getZookeeperTimeout()
{
  return new TimeSpan(500, TimeUnit.MILLISECONDS);
}

代码示例来源:origin: com.nesscomputing.components/ness-httpclient

/**
 * Default is 60000 (60 seconds).
 *
 * @return Timeout for a request sent until a response must arrive.
 */
@Config({"ness.httpclient.${httpclient_name}.request-timeout", "ness.httpclient.request-timeout"})
@Default("60s")
public TimeSpan getRequestTimeout()
{
  return new TimeSpan(60, TimeUnit.SECONDS);
}

代码示例来源:origin: com.nesscomputing.service.discovery/discovery-client

/**
 * Scan time for the client. This is the absolute maximum time
 * between syncing the local state with remote state, usually, these are triggered
 * by the watch on the root node. Default is 120 seconds.
 *
 */
@Config("ness.discovery.scan-interval")
@Default("120s")
public TimeSpan getScanInterval()
{
  return new TimeSpan(120, TimeUnit.SECONDS);
}

代码示例来源:origin: com.nesscomputing.service.discovery/discovery-client

/**
 * Tick time of the internal thread. This is the interval used for checking internal
 * state changes. Default is 100 Milliseconds.
 *
 */
@Config("ness.discovery.tick-interval")
@Default("100ms")
public TimeSpan getTickInterval()
{
  return new TimeSpan(100, TimeUnit.MILLISECONDS);
}

代码示例来源:origin: com.nesscomputing.components/ness-quartz

@Override
  public void configure()
  {
    bind(GuiceJob.class);
    DateTime nowPlus2Seconds = DateTime.now().plusSeconds(2);
    QuartzJobBinder.bindQuartzJob(binder(), GuiceJob.class).startTime(nowPlus2Seconds, new TimeSpan("1s")).register();
  }
});

相关文章