public int TryRemoveFromBuffer() //tested
        {
            Neurotransmitter removed = buffer.Take();
            int charge = removed.Charge;

            int oldMembranePotential = membranePotential;

            //affect local membrane potential
            int currentMembranePotential = Interlocked.Add(ref membranePotential, charge);


            //decide whether change was significant enough to add to SecondaryMessenger
            if (Math.Abs(currentMembranePotential - oldMembranePotential) > significantVoltageChange)
            {
                messenger.AddEvent(DateTime.Now);

                //check whether dendrite growth state threshold reached
                if (state == 0 && messenger.IsGrowthStateTriggered(DateTime.Now))
                {
                    SetGrowthState();
                }
            }

            return(charge);
        }
 private void CheckCellGrowthEventThreshold() //tested
 {
     if (messenger.IsGrowthStateTriggered(DateTime.Now))
     {
         SetGrowthState();
     }
 }