ó ¾[/\c@@sÃdZddlmZddlmZddlmZddlmZddlZ ddl Z ddl Z ddl Z e j e jdƒZe jdƒZd „Zd „Zd „Zd „ZdS( u/Various utility functions, and a utility class.i(tabsolute_import(tunicode_literals(t format_number(t_Nu SC_CLK_TCKudnfcC@st|ƒtS(uäConvert a number of jiffies to seconds. How many jiffies are in a second is system-dependent, e.g. 100 jiffies = 1 second is common. :param jiffies: a number of jiffies :return: the equivalent number of seconds (tintt_USER_HZ(tjiffies((s1/usr/lib/python2.7/site-packages/dnf/cli/utils.pytjiffies_to_secondsscC@s{|dkr8d|d |d d|dd|dfS|d kred|d |dd|dfSd|d|dfS( uReturn a human-readable string representation of the length of a time interval given in seconds. :param seconds: the length of the time interval in seconds :return: a human-readable string representation of the length of the time interval i<iu%d day(s) %d:%02d:%02du %d:%02d:%02du %02d:%02dii€Qii€Qiii((tseconds((s1/usr/lib/python2.7/site-packages/dnf/cli/utils.pytseconds_to_ui_time)s       c C@s6t|ƒ}tjjd|ƒ sMtjjdƒ sMtjjd|ƒ rQdSi}td|ƒ}x“|D]‹}|ddkrqqn|d jddƒ}t|ƒd kr»qqntjj |dd ƒ|d<|dj ƒ||d j ƒj ƒs      0