????

Your IP : 3.19.208.67


Current Path : /proc/self/root/lib/python3.6/site-packages/glances/plugins/__pycache__/
Upload File :
Current File : //proc/self/root/lib/python3.6/site-packages/glances/plugins/__pycache__/glances_now.cpython-36.pyc

3

Eo�c��@s4dZddlmZmZddlmZGdd�de�ZdS)zNow (current date) plugin.�)�tzname�strftime)�
GlancesPlugincs<eZdZdZd�fdd�	Zdd�Zdd�Zdd	d
�Z�ZS)
�Pluginz@Plugin to get the current date/time.

    stats is (string)
    NcsZtt|�j||d�d|_d|_|jr0|j|_n&|dk	rVd|j�krV|j�dd|_dS)zInit the plugin.)�args�configTZbottomN�global�strftime_format)�superr�__init__Z
display_curseZalignr	rZas_dict)�selfrr)�	__class__��!/usr/lib/python3.6/glances_now.pyrs
zPlugin.__init__cCs
d|_dS)zReset/init the stats.�N)�stats)rrrr�reset&szPlugin.resetcCs@|jrt|j�|_n&ttd�dkr0td�|_n
td�|_|jS)zUpdate current date/time.��z%Y-%m-%d %H:%M:%S %zz%Y-%m-%d %H:%M:%S %Z)rr�lenr)rrrr�update*s
z
Plugin.updatecCs8g}|js|j�r|Sdj|j�}|j|j|��|S)z4Return the string to display in the curse interface.z{:23})rZis_disabled�format�appendZcurse_add_line)rrZ	max_width�ret�msgrrr�	msg_curse9szPlugin.msg_curse)NN)NN)	�__name__�
__module__�__qualname__�__doc__rrrr�
__classcell__rr)r
rrs
rN)rZtimerrZglances.plugins.glances_pluginrrrrrr�<module>
s