From 723ed4f98f640fd2015cd752716d15cd3e669538 Mon Sep 17 00:00:00 2001 From: DanielShaulov Date: Fri, 15 Jan 2016 18:13:22 +0200 Subject: [PATCH] Add timer class to threading.pyi --- stdlib/3/threading.pyi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdlib/3/threading.pyi b/stdlib/3/threading.pyi index 57676b30c..a3e2597ba 100644 --- a/stdlib/3/threading.pyi +++ b/stdlib/3/threading.pyi @@ -54,3 +54,8 @@ class Condition: def wait_for(self, predicate: Callable[[], _T], timeout: float = ...) -> Union[_T, bool]: ... def __enter__(self) -> bool: ... def __exit__(self, *args): ... + +class Timer(Thread): + def __init__(self, interval: float, function: Callable[..., Any], + args: Any = ..., kwargs: Dict[Any, Any] = ...) -> None: ... + def cancel(self) -> None : ...