import types

from statsd.client.base import StatsClientBase

def safe_wraps(wrapper, *args, **kwargs): ...

class Timer:
    client: StatsClientBase
    stat: str
    rate: int
    ms: float
    def __init__(self, client: StatsClientBase, stat: str, rate: int = 1) -> None: ...
    def __call__(self, f): ...
    def __enter__(self) -> Timer: ...
    def __exit__(self, typ: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None) -> None: ...
    def start(self) -> Timer: ...
    def stop(self, send: bool = True) -> Timer: ...
    def send(self) -> None: ...
