from unittest.mock import Mock
from unittest.mock import patch
from typing import cast


def timer() -> Mock:
    """Mock our periodic timer"""
    with patch("edge.edge.PeriodicTimer", autospec=True) as mock:
        return cast(Mock, mock.return_value)