INNER CODE UNIT · Python
clear_console
tlkh/asitop · asitop/utils.py:38
def clear_console():
command = 'clear'
os.system(command)
def convert_to_GB(value):
return round(value/1024/1024/1024, 1)
def run_powermetrics_process(timecode, nice=10, interval=1000):
#ver, *_ = platform.mac_ver()
#major_ver = int(ver.split(".")[0])
for tmpf in glob.glob("/tmp/asitop_powermetrics*"):
os.remove(tmpf)
output_file_flag = "-o"
command = " ".join([
"sudo nice -n",
str(nice),