def CheckStats(self):
    """Checks if the last transmission of client stats is too long ago."""
    if self.last_stats_sent_time is None:
      self.last_stats_sent_time = rdfvalue.RDFDatetime().Now()
      stats.STATS.SetGaugeValue("grr_client_last_stats_sent_time",
                                self.last_stats_sent_time.AsSecondsFromEpoch())

    time_since_last_check = (rdfvalue.RDFDatetime().Now() -
                             self.last_stats_sent_time)

    # No matter what, we don't want to send stats more often than
    # once per STATS_MIN_SEND_INTERVAL.
    if time_since_last_check < self.STATS_MIN_SEND_INTERVAL:
      return

    if (self.STATS_MAX_SEND_INTERVAL > time_since_last_check or
        self._is_active or self._send_stats_on_check):

      self._send_stats_on_check = False

      logging.info("Sending back client statistics to the server.")

      action_cls = actions.ActionPlugin.classes.get(
          "GetClientStatsAuto", actions.ActionPlugin)
      action = action_cls(grr_worker=self)
      action.Run(rdf_client.GetClientStatsRequest(
          start_time=self.last_stats_sent_time))

      self.last_stats_sent_time = rdfvalue.RDFDatetime().Now()
      stats.STATS.SetGaugeValue("grr_client_last_stats_sent_time",
                                self.last_stats_sent_time.AsSecondsFromEpoch())
dataset/ETHPy150Open google/grr/grr/client/comms.py/GRRClientWorker.CheckStats/swapped operands of `>`