anchor.diff:      partisan_config:get(tls_options).
   
   %% @private
  +monotonic_now() ->
  +    erlang:monotonic_time(millisecond).
  +
  +%% @private
   send(Transport, Socket, Data) ->
       %% Update last transmission time.
  -    put(last_transmission_time, erlang:monotonic_time(millisecond)),
  +    put(last_transmission_time, monotonic_now()),
   
       %% Transmit the data on the socket.
       Transport:send(Socket, Data).
  
positive.code: send(#connection{socket = Socket, transport = Transport, monotonic = Monotonic}, Data) ->
      case Monotonic of
          true ->
              %% Get the current message queue time.
              {message_queue_len, MessageQueueLen} = process_info(self(), message_queue_len),
  
              %% TODO: Get last send time.
              LastTransmissionTime = get(last_transmission_time),
  
              %% Test for whether we should send or not.
  
negative.code: monotonic_should_send(MessageQueueLen, LastTransmissionTime) ->
      case length(MessageQueueLen) > 0 of
          true ->
              %% Messages in queue; conditional send.
              NowTime = monotonic_now(),
  
              Diff = abs(NowTime - LastTransmissionTime),
  
              SendWindow = partisan_config:get(send_window, 1000),
  
              case Diff > SendWindow of
                  true ->
                      %% We haven't sent recently enough; transmit.
                      true;
                  false ->
                      %% We sent within the window; ignore.
                      false
              end;
          false ->
              %% No messages in queue; transmit.
              true
      end.