//public float timeAccumulator = 0f;

        private AValue Sync(string key, AValue value, bool saveOnlyNoSend = false, bool sendWithoutDiffCheck = false)
        {
            AValue tmpValue = getValue(key, InputReadingMethod.CanReadSameValueMultipleTimes);

            if (hasAuthority())
            {
                bool isDifferent = false;
                if (value.CompareTo(tmpValue) != 0)
                {
                    isDifferent = true;
                }

                saveValue(key, value);

                if (!saveOnlyNoSend)
                {
                    if (isDifferent || sendWithoutDiffCheck)
                    {
                        sendUpdate(key, value);
                    }
                }
            }
            else
            {
                value = tmpValue;
            }

            return(value);
        }