protected void updateUseTime() { last_used = SystemTime.getMonotonousTime(); }
public void updateFilter( BloomFilter f ) { filter = f; last_update = SystemTime.getMonotonousTime(); } }
@Override public long getUnchokedForMillis() { long time = effectively_unchoked_time; if ( effectively_choked_by_other_peer || time < 0 ){ return( -1 ); } return( SystemTime.getMonotonousTime() - time ); }
void rebind() { bind_time = SystemTime.getMonotonousTime(); }
protected Object[] getScrape() { long now = SystemTime.getMonotonousTime(); if ( now - last_scrape_fixup_time > 30*1000 || last_scrape == null ){ last_scrape = new Object[]{ -1, -1, -1, -1, -1, "" }; last_scrape_fixup_time = now; } return( last_scrape ); }
ForeignBloom( DistributedDatabaseContact _contact, BloomFilter _filter ) { contact = _contact; filter = _filter; created = SystemTime.getMonotonousTime(); last_update = created; }
private boolean isComplete() { return( complete_time != -1 && SystemTime.getMonotonousTime() - complete_time > FADE_OUT ); }
@Override public void peerRemoved( PEPeerManager manager, PEPeer peer ) { last_activity_time = SystemTime.getMonotonousTime(); } });
void connectFailed() { consec_fails++; last_connect_time = SystemTime.getMonotonousTime(); }
public static long getMillisecondsSinceLastTorrentDelete() { synchronized( TorrentUtils.class ){ if ( torrent_delete_time == 0 ){ return( Long.MAX_VALUE ); } return( SystemTime.getMonotonousTime() - torrent_delete_time ); } }
public static void ensureDisplayUpdated( Display display ) { long start = SystemTime.getMonotonousTime(); // make sure display is up to date while (display.readAndDispatch()) { if ( SystemTime.getMonotonousTime() - start > 5000 ){ // hmmm, somert wrong return; } } }
ConnectionRequest( long _id, InetSocketAddress _address, ConnectListener _listener, int _connect_timeout, int _priority ) { id = _id; address = _address; listener = _listener; connect_timeout = _connect_timeout; request_start_time = SystemTime.getMonotonousTime(); rand = (short)( RandomUtils.nextInt( Short.MAX_VALUE )); priority = _priority; }
@Override public long getSecondsOnlySeeding() { long lTimeStarted = getTimeStartedSeeding( true ); if (lTimeStarted >= 0) { return saved_SecondsOnlySeeding + ((SystemTime.getMonotonousTime() - lTimeStarted) / 1000); } return saved_SecondsOnlySeeding; }
protected boolean wakeup() { synchronized( DeviceTivoManager.this ){ if ( search_destroyed ){ return( false ); } start = SystemTime.getMonotonousTime(); } sendBeacon(); return( true ); }
@Override public void mdiEntryVitalityImage_clicked(int x, int y) { synchronized( items ){ cog_click_time[0] = SystemTime.getMonotonousTime(); new DBConfigWindow( new ArrayList<DashboardItem>( items )); } }});
Map<Long,DownloadHistoryImpl> getDeadHistory() { Map<Long,DownloadHistoryImpl> ref = history_dead.get(); if ( ref == null ){ ref = loadHistory( CONFIG_DEAD_FILE ); dead_load_time = SystemTime.getMonotonousTime(); history_dead = new WeakReference<>(ref); dead_history_size = ref.size(); } return( ref ); }
@Override public void clear() { start_time = SystemTime.getMonotonousTime(); for ( BloomFilter filter: filters ){ filter.clear(); } }
protected void fixup() { long now = SystemTime.getMonotonousTime(); if ( peers == null || now - fixup_time > 10*1000 ){ fixup_time = now; peers = getManualWebSeeds(download); int state = download.getState(); running = state == Download.ST_DOWNLOADING || state == Download.ST_SEEDING; } } });
@Override public void perform(TimerEvent e){ synchronized( event ){ if ( plugin.getSWTUI() != null ){ callback.run(); event[0].cancel(); }else if ( SystemTime.getMonotonousTime() - start > 30*1000 ){ event[0].cancel(); } } } });
private static final class QueueEntry { public QueueEntry(PEPeerTransportProtocol trans) { transport = trans; } final PEPeerTransportProtocol transport; final long addTime = SystemTime.getMonotonousTime(); }