/** * Find clock diff between server and API server, and store the diff locally. * * @return bool|int False if clock diff didn't change, otherwise returns the clock diff in seconds. */ private function _sync_clock_diff() { $this->_logger->entrance(); // Sync clock and store. $new_clock_diff = $this->_api->FindClockDiff(); if ($new_clock_diff === self::$_clock_diff) { return false; } // Update API clock's diff. $this->_api->SetClockDiff(self::$_clock_diff); // Store new clock diff in storage. self::$_options->set_option('api_clock_diff', self::$_clock_diff, true); return $new_clock_diff; }