Current Path : /usr/lib/python2.7/dist-packages/landscape/lib/ |
Current File : //usr/lib/python2.7/dist-packages/landscape/lib/jiffies.pyc |
ó ÍÿŠTc @ s d d l Z d „ Z d S( iÿÿÿÿNc C sS t d ƒ } t d ƒ } | j } | j } xt r:| ƒ } t j ƒ } | d k rd t j d ƒ n | ƒ } t d | ƒ } | j ƒ } | j ƒ t j | d ƒ t | j ƒ d ƒ } t | j ƒ d ƒ } t | j ƒ d ƒ } t | | d ƒ } t | | d ƒ } | | k rPn | j d ƒ | j d ƒ q- W| j ƒ | j ƒ | S( sï Returns the number of jiffies per second for this machine. A jiffy is a value used by the kernel to report certain time-based events. Jiffies occur N times per second where N varies depending on the hardware the kernel is running on. This function gets the uptime for the current process, forks a child process and gets the uptime again; finally, using the running time of the child process compared with the uptimes to determine number of jiffies per second. s /proc/uptimei s /proc/%d/stati g à?( t opent readt Truet ost forkt _exitt closet waitpidt floatt splitt intt seek( t uptime1_filet uptime2_filet read_uptime1t read_uptime2t uptime1_datat pidt uptime2_datat stat_filet stat_datat seconds_uptime1t seconds_uptime2t jiffie_uptimet jiffies1t jiffies2( ( s9 /usr/lib/python2.7/dist-packages/landscape/lib/jiffies.pyt detect_jiffies s4 ( R R ( ( ( s9 /usr/lib/python2.7/dist-packages/landscape/lib/jiffies.pyt <module> s