Java Code Examples for org.bitcoinj.core.Utils#currentTimeMillis()

The following examples show how to use org.bitcoinj.core.Utils#currentTimeMillis() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExponentialBackoff.java    From bcm-android with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Track a success - reset back off interval to the initial value
 */
public final void trackSuccess() {
    backoff = params.initial;
    retryTime = Utils.currentTimeMillis();
}
 
Example 2
Source File: ExponentialBackoff.java    From bcm-android with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Track a failure - multiply the back off interval by the multiplier
 */
public void trackFailure() {
    retryTime = Utils.currentTimeMillis() + (long) backoff;
    backoff = Math.min(backoff * params.multiplier, params.maximum);
}
 
Example 3
Source File: ExponentialBackoff.java    From green_android with GNU General Public License v3.0 4 votes vote down vote up
/** Track a success - reset back off interval to the initial value */
public final void trackSuccess() {
    backoff = params.initial;
    retryTime = Utils.currentTimeMillis();
}
 
Example 4
Source File: ExponentialBackoff.java    From green_android with GNU General Public License v3.0 4 votes vote down vote up
/** Track a failure - multiply the back off interval by the multiplier */
public void trackFailure() {
    retryTime = Utils.currentTimeMillis() + (long)backoff;
    backoff = Math.min(backoff * params.multiplier, params.maximum);
}
 
Example 5
Source File: ExponentialBackoff.java    From GreenBits with GNU General Public License v3.0 4 votes vote down vote up
/** Track a success - reset back off interval to the initial value */
public final void trackSuccess() {
    backoff = params.initial;
    retryTime = Utils.currentTimeMillis();
}
 
Example 6
Source File: ExponentialBackoff.java    From GreenBits with GNU General Public License v3.0 4 votes vote down vote up
/** Track a failure - multiply the back off interval by the multiplier */
public void trackFailure() {
    retryTime = Utils.currentTimeMillis() + (long)backoff;
    backoff = Math.min(backoff * params.multiplier, params.maximum);
}