def time_deferred(self, d, metric, tags, sample_rate=1):
        def _time_and_passthrough(result, start):
            self.timing(metric, time.time() - start, tags=tags, sample_rate=sample_rate)
            return result

        d.addBoth(_time_and_passthrough, time.time())
        return d
dataset/ETHPy150Open foundit/Piped/contrib/statsd/piped_statsd/client.py/PipedStatsd.time_deferred/original