Don't call this unless you have paused the updater and intend to update yourself
@param now
@return
971765
public static Long update(final long now) {
        final long estNow = EstTime.m_now;
        if (estNow == now) {
            return null;
        }

        EstTime.m_now = now;

        /*
         * Check if updating the estimated time was especially tardy.
         * I am concerned that the thread responsible for updating the estimated
         * time might be blocking on something and want to be able to log if
         * that happens
         */
        if (now - estNow > ESTIMATED_TIME_WARN_INTERVAL) {
            /*
             * Only report the error every 60 seconds to cut down on log spam
             */
            if (lastErrorReport > now) {
                //Time moves backwards on occasion, check and reset
                lastErrorReport = now;
            }
            if (now - lastErrorReport > maxErrorReportInterval) {
                lastErrorReport = now;
                return now - estNow;
            }
        }
        return null;
    }
1033999
public void setCreate(long now, SimpleOrderedMap<Object> status)
      throws IOException {
    if (action.equals(ComponentCollection.ACTION_CREATE)) {
      this.now = now;
      this.status = status;
    } else {
      throw new IOException("not allowed with action '" + action + "'");
    }
  }
186495
public CallOptions withoutWaitForReady() {
    CallOptions newOptions = new CallOptions(this);
    newOptions.waitForReady = Boolean.FALSE;
    return newOptions;
  }
923632
public StopWatch tick() {
        long old = ticker;
        ticker = System.currentTimeMillis();
        lastElapsed = (int) (ticker - old);
        return this;
    }
99595
public Sink update() {
    // [START update]
    Sink updatedSink = sink.toBuilder().setFilter("severity<=ERROR").build().update();
    // [END update]
    return updatedSink;
  }
1048063
public PlainTimestamp now() {

        final UnixTime ut = this.timeSource.currentTime();
        Timezone tz = (this.timezone == null) ? Timezone.ofSystem() : this.timezone;
        return PlainTimestamp.from(ut, tz.getOffset(ut));

    }
845863
private void setUpUpdateService() {
		if (currentUpdateTask != null) {
			currentUpdateTask.cancel(false);
		}
		currentUpdateTask = scheduler.scheduleWithFixedDelay(getDataStore().getUpdateOperation(), 0, updateInterval, MILLISECONDS);
	}
207458
@Nonnull
  public EChange stop ()
  {
    // Already stopped?
    if (m_nStartDT == 0)
      return EChange.UNCHANGED;

    final long nCurrentNanoTime = getCurrentNanoTime ();
    m_nDurationNanos += (nCurrentNanoTime - m_nStartDT);
    m_nStartDT = 0;
    return EChange.CHANGED;
  }
766472
@Override
	public void update () {
		// Execute the global state (if any)
		if (globalState != null) globalState.update(owner);

		// Execute the current state (if any)
		if (currentState != null) currentState.update(owner);
	}
484718
public int update() {
        this.beforeCheck();
        String       sql             = this.buildUpdateSQL(null, updateColumns);
        List<Object> columnValueList = new ArrayList<>();
        updateColumns.forEach((key, value) -> columnValueList.add(value));
        columnValueList.addAll(paramValues);
        return this.execute(sql, columnValueList);
    }
919811
Future<HeaderCacheElement> asyncRefresh() {
    LOG.trace("asyncRefresh");

    synchronized (lock) {
      try {
        if (futureToken != null) {
          return futureToken;
        }
        if (headerCache.getCacheState() == CacheState.Good) {
          return Futures.immediateFuture(headerCache);
        }

        Future<HeaderCacheElement> future = executor.submit(new Callable<HeaderCacheElement>() {
          @Override
          public HeaderCacheElement call() {
            return updateToken();
          }
        });

        if (!future.isDone()) {
          this.futureToken = future;
        }
        return future;
      } catch (RuntimeException e) {
        futureToken = null;
        LOG.warn("Got an unexpected exception while trying to refresh google credentials.", e);
        return Futures.immediateFuture(new HeaderCacheElement(
          Status.UNAUTHENTICATED
              .withDescription("Unexpected error trying to authenticate")
              .withCause(e)));
      }
    }
  }
449456
public boolean makeCalls(long now) {
    if (now < nextDispatchTime)
      return true;

    // we make calls in a loop until all pending calls are drained
    // if any call hits an error - we stop
    while (!pendingCalls.isEmpty()) {

      TBase call = pendingCalls.get(0);
      try {
        // initialize the client/transport unless already done
        init();

        // make one thrift call
        dispatchCall(call);

        // if we made a call successfully, reset any retry state
        nextDispatchTime = -1;
        numRetries = 0;
        currentRetryInterval = retryIntervalStart;

        pendingCalls.remove(0);

      } catch (TException e) {
        boolean logged = false;
        if (e instanceof TTransportException) {
          TTransportException tte = (TTransportException) e;
          Throwable cause =  tte.getCause();
          if (cause != null && cause instanceof SocketTimeoutException) {
            // Got a socket timeout while waiting for a response from the
            // client. The session is stuck.
            logged = true;
            LOG.error("Call to session: " + handle + " for call: " +
              call.getClass().getName() + ", numRetry: " + numRetries +
              "(retryCountMax=" + retryCountMax + ")" +
              " failed with SocketTimeoutException, will retry it");
          }
        }
        if (!logged) {
          LOG.warn("Call to session: " + handle + " for call: " +
            call.getClass().getName() + ", numRetry: " + numRetries +
            "(retryCountMax=" + retryCountMax + ")" +
            " failed with TException", e);
        }

        // close the transport/client on any exception
        // will be reopened on next try
        close();

        if (numRetries > retryCountMax)
          return false;

        numRetries++;
        nextDispatchTime = now + currentRetryInterval;
        currentRetryInterval *= retryIntervalFactor;

        // no more calls for now
        return true;
      }
    }

    close();

    return true;
  }
63309
public Blob update() {
    // [START update]
    Map<String, String> newMetadata = new HashMap<>();
    newMetadata.put("key", "value");
    blob.toBuilder().setMetadata(null).build().update();
    Blob updatedBlob = blob.toBuilder().setMetadata(newMetadata).build().update();
    // [END update]
    return updatedBlob;
  }
302747
public synchronized boolean remove() {
        SharedPreferences prefs = loadSharedPreferences("object");

        if (find(getId()) != null) {
            if (!removeObject()) return false;

            modelListenerHandler.execOnUpdateListeners(this, OnUpdateListener.Status.REMOVED);

            prefs.edit().putString(String.valueOf(getId()), null).commit();

            return true;
        }

        return false;
    }
791742
public Future<T> asyncRun()
	{
		final Thread t = new Thread(this);
		{
			t.setName("AsyncRun for " + this);
			t.setDaemon(true);
			t.start();
		}

		return this;
	}
1321815
public long now(@NonNull TimeUnit unit) {
        return unit.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS);
    }
1056243
public ListenableFuture<ThriftConnection<T>> getAsyncConnection() {
		return this.asyncExecutor.submit(new Callable<ThriftConnection<T>>() {

			public ThriftConnection<T> call() throws Exception {
				return getConnection();
			}
		});
	}