Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
import os, sys, inspect
import time
lib_folder = os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0], '..')
lib_load = os.path.realpath(os.path.abspath(lib_folder))
if lib_load not in sys.path:
sys.path.insert(0, lib_load)
import capablerobot_usbhub
hub = capablerobot_usbhub.USBHub()
last = int(time.time() * 1000)
while True:
now = int(time.time() * 1000)
print(str(now - last).rjust(3), " ".join([("%.2f" % v).rjust(7) for v in hub.power.measurements()]))
last = now