Skip to content

eiclpy/py_cycle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Get CPU cycle diff

Install

python setup.py install --user

Usage

import py_cycle
print(py_cycle.getCycle())# Get current CPU cycle

# If cycleDiff(id) has not be called, the function will return None, else return CPU cycle between nearest cycleDiff(id) called. 
py_cycle.cycleDiff(1)
for i in range(1000000):
    pass
print(py_cycle.cycleDiff(1))

py_cycle.cycleDiff(2)
for i in range(100):
    for j in range(10000):
        pass
    print(py_cycle.cycleDiff(2))
print(py_cycle.getStatistic(2))# return statistic info. tuple(count,total,average,min,max)

About

Get CPU cycle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published