protected long getAliveTime() { long now = SystemTime.getCurrentTime(); if ( now < alive_time ){ alive_time = now; } return( alive_time ); } }
@Override public long getSteppedMonoTime() { if ( SOD_IT_LETS_USE_HPC ){ return( getHighPrecisionCounter()/1000000 ); }else{ return( stepped_mono_time ); } } }
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 ); }
private void update( boolean good ) { last_received_mono = SystemTime.getMonotonousTime(); last_received_rtc = SystemTime.getCurrentTime(); request_count++; last_was_good = good; } }
long now = SystemTime.getMonotonousTime(); long start = SystemTime.getHighPrecisionCounter(); long elapsed = ( SystemTime.getHighPrecisionCounter() - start ) / 1000000; entry[1] = SystemTime.getMonotonousTime() + delay;
schedule() SystemTime.registerMonotonousConsumer( new SystemTime.TickConsumer() long last_stats_time = SystemTime.getMonotonousTime(); latest_time = SystemTime.getMonotonousTime(); long wait_start = SystemTime.getHighPrecisionCounter(); long wait_time = SystemTime.getHighPrecisionCounter() - wait_start;
public boolean canFlipRead() { long ofs = SystemTime.getOffsetTime(-300); if (readOn > 0) { return ofs > readOn; } else { return ofs > (-1 * readOn); } } }
@Override public void mdiEntrySelected(MdiEntry newEntry, MdiEntry oldEntry) { if (entry == newEntry) { if (entry == oldEntry) { if (lastSelect < SystemTime.getOffsetTime(-1000)) { if (browserSkinObject != null) { browserSkinObject.restart(); } } } else { lastSelect = SystemTime.getCurrentTime(); } } }
@Override public void perform( TimerEvent event ) { synchronized( TableColumnManager.this ){ long now = SystemTime.getMonotonousTime(); if ( now - lastTableConfigAccess > 25000 ){ tablesConfig = null; }else{ SimpleTimer.addEvent( "DisposeTableConfigMap", SystemTime.getOffsetTime(30000), this ); } } } });
protected long getEffectiveTime() { return( SystemTime.getSteppedMonotonousTime()); } }
/** Initialize TrackerChecker. * * @note Since there is only one TRTrackerScraperImpl, there will only be one * TrackerChecker instance. * */ protected TrackerChecker(TRTrackerBTScraperImpl _scraper) { scraper = _scraper; trackers = new HashMap(); if ( !COConfigurationManager.getBooleanParameter("Tracker Client Scrape Total Disable")){ runScrapes(); } AEDiagnostics.addWeakEvidenceGenerator( this ); SystemTime.registerClockChangeListener( this ); }
public synchronized void destroy() { if ( indestructable ){ Debug.out( "Attempt to destroy indestructable timer '" + getName() + "'" ); }else{ destroyed = true; notify(); SystemTime.unregisterClockChangeListener( this ); } if (DEBUG_TIMERS) { try { timers_mon.enter(); // crappy for (Iterator iter = timers.iterator(); iter.hasNext();) { WeakReference timerRef = (WeakReference) iter.next(); Object timer = timerRef.get(); if (timer == null || timer == this) { iter.remove(); } } } finally { timers_mon.exit(); } } }
long start = SystemTime.getHighPrecisionCounter(); long elapsed_millis = ( SystemTime.getHighPrecisionCounter() - start ) / 1000000; current_interfaces = result; last_ni_check = SystemTime.getMonotonousTime();
schedule() latest_time = SystemTime.getMonotonousTime(); SystemTime.registerMonotonousConsumer( new SystemTime.TickConsumer() wait_count++; try{ long wait_start = SystemTime.getHighPrecisionCounter(); wait( 5000 ); long wait_time = SystemTime.getHighPrecisionCounter() - wait_start; total_wait_time += wait_time; }catch( Throwable e ){
private static long getCutoffTime() { return SystemTime.getOffsetTime(-MAX_LIFE_MS); }
private void update_avail_byte_count() { if ( frozen ){ return; } final long now =SystemTime.getSteppedMonotonousTime(); if (prev_update_time <now) { avail_bytes +=((now -prev_update_time) * rate) / 1000; prev_update_time =now; if( avail_bytes > burst_rate ) avail_bytes = burst_rate; else if( avail_bytes < 0 ) Debug.out("ERROR: avail_bytes < 0: " + avail_bytes); } }
public Timer( String name, int thread_pool_size, int thread_priority ) { if (DEBUG_TIMERS) { try { timers_mon.enter(); if (timers == null) { timers = new ArrayList<>(); AEDiagnostics.addEvidenceGenerator(new evidenceGenerator()); } timers.add(new WeakReference<>(this)); } finally { timers_mon.exit(); } } thread_pool = new ThreadPool(name,thread_pool_size); SystemTime.registerClockChangeListener( this ); Thread t = new Thread(this, "Timer:" + name ); t.setDaemon( true ); t.setPriority(thread_priority); t.start(); }
protected void setStatus( String str ) { last_status_set_time = (int)(SystemTime.getCurrentTime()/1000); sStatus = str; }
ForeignBloom( DistributedDatabaseContact _contact, BloomFilter _filter ) { contact = _contact; filter = _filter; created = SystemTime.getMonotonousTime(); last_update = created; }
if ( CONNECT_SELECT_LOOP_MIN_TIME > 0 ){ long start = SystemTime.getHighPrecisionCounter(); long duration = SystemTime.getHighPrecisionCounter() - start; final long now =SystemTime.getMonotonousTime();