Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/tempora/__pycache__/timing.cpython-39.pyc
Ðазад
a n�h� � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl m Z d dlmZ d dl Zerld dlmZ G dd� d�ZG dd � d �ZG d d� de�ZG dd � d ejj�ZdS )� )�annotationsN)� TracebackType)� TYPE_CHECKING)�Selfc @ s� e Zd ZdZdd�dd�Zdd�dd�Zdd�d d �Zdd�dd�Zdd�d d�Zdd�dd�Z dd�dd�Z ddddd�dd�ZdS )� Stopwatcha� A simple stopwatch that starts automatically. >>> w = Stopwatch() >>> _1_sec = datetime.timedelta(seconds=1) >>> w.split() < _1_sec True >>> time.sleep(1.0) >>> w.split() >= _1_sec True >>> w.stop() >= _1_sec True >>> w.reset() >>> w.start() >>> w.split() < _1_sec True Launch the Stopwatch in a context: >>> with Stopwatch() as watch: ... assert isinstance(watch.split(), datetime.timedelta) After exiting the context, the watch is stopped; read the elapsed time directly: >>> watch.elapsed datetime.timedelta(...) >>> watch.elapsed.seconds 0 �None��returnc C s | � � | �� d S �N)�reset�start��self� r �~/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/tempora/timing.py�__init__2 s zStopwatch.__init__c C s>