Hacked By AnonymousFox
�
)�fX � �J � d dl mZ d dl mZ d dlZd dlZ G d� de� � ZdS )� )�print_function)�absolute_importNc �D � e Zd ZdZd
d�Zd� Zed� � � Zd� Zdd�Z d S )�ProgressCallbackz6
Class to display the progress in the console
� �?c �R � || _ t j � � | _ d| _ d S )Nr )�time_change_step�time�ts_start�ts_change_screen)�selfr s ��/builddir/build/BUILDROOT/lve-stats-4.2.8-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/commons/progress.py�__init__zProgressCallback.__init__ s% � � 0���� ����
� !����� c �6 � t j � � | _ d S �N)r
r )r
s r �startzProgressCallback.start s � �� ����
�
�
r c �$ � t d� � d S )N� )�print� r r �stopzProgressCallback.stop s � �
�b� � � � � r c �$ � t j � d� |t t j � � | j z
� � � � � � t j � � � t j � � | _ d S )Nz$
Progress: {0:.2f}%; work time: {1}s) �sys�stdout�write�format�intr
r �flushr )r
�
percentages r �
change_screenzProgressCallback.change_screen ss � ��
���3�:�:��C�� ���d�m� ;�<�<�
>�
>� ?� ?� ?� �
������ $� ������r Fc � � |s$t j � � | j z
| j k r| � |� � d S d S r )r
r r r! )r
r �forces r �__call__zProgressCallback.__call__% sH � �� +�T�Y�[�[�4�#8�8�D�<Q�Q�Q����z�*�*�*�*�*� R�Qr N)r )F)
�__name__�
__module__�__qualname__�__doc__r r �staticmethodr r! r$ r r r r r
s � � � � � �� �"� "� "� "�
$� $� $� �� � �\��,� ,� ,�+� +� +� +� +� +r r )�
__future__r r r r
�objectr r r r �<module>r, sq �� &� %� %� %� %� %� &� &� &� &� &� &�
�
�
�
� ����+� +� +� +� +�v� +� +� +� +� +r
Hacked By AnonymousFox1.0, Coded By AnonymousFox