src/Net/AtomServerTime.php
protected function synchronize()
	{
		if( file_exists( $this->syncFile ) )
		{
			$time	= filemtime( $this->syncFile );
			if( ( time() - $time ) < $this->refreshTime )
			{
				$this->syncTime	= $time;
				$this->syncDiff	= FS_File_Reader::load( $this->syncFile );
				return;
			}
		}
		$this->syncTime	= time();
		$this->syncDiff	= $this->syncTime - Net_AtomTime::getTimestamp();
		FS_File_Writer::save( $this->syncFile, $this->syncDiff );
		touch( $this->syncFile );
	}
protected function synchronize()
	{
		if( file_exists( $this->syncFile ) )
		{
			$time	= filemtime( $this->syncFile );
			if( ( time() - $time ) < $this->refreshTime )
			{
				$this->syncTime	= $time;
				$this->syncDiff	= FS_File_Reader::load( $this->syncFile );
				return;
			}
		}
		$this->syncTime	= time();
		$this->syncDiff	= $this->syncTime - Net_AtomTime::getTimestamp();
		FS_File_Writer::save( $this->syncFile, $this->syncDiff );
		touch( $this->syncFile );
	}
protected function synchronize ( ) { if ( file_exists ( $ this -> syncFile ) ) { $ time = filemtime ( $ this -> syncFile ) ; if ( ( time ( ) - $ time ) < $ this -> refreshTime ) { $ this -> syncTime = $ time ; $ this -> syncDiff = FS_File_Reader :: load ( $ this -> syncFile ) ; return ; } } $ this -> syncTime = time ( ) ; $ this -> syncDiff = $ this -> syncTime - Net_AtomTime :: getTimestamp ( ) ; FS_File_Writer :: save ( $ this -> syncFile , $ this -> syncDiff ) ; touch ( $ this -> syncFile ) ; }
Synchronizes server time with atom time by saving time difference.
@access		protected
@return		void
Synchronizes server time with atom time by saving time difference .