INNER CODE UNIT · Python
latencyMax
google/oboe · apps/OboeTester/scripts/dsp_timing.py:183
latencyMax = runOneLatencyTest(kOffsetMax + 1000)
print "latency = " + str(latencyMin) + " => " + str(latencyMax)
if latencyMax < (latencyMin + (capacityMillis / 2)):
print "ERROR Latency not affected by changing offset!"
return True
return False
def isRunningAsRoot():
userName = subprocess.check_output(["adb", "shell", "whoami"]).strip()
if userName != "root":
print "WARNING: changing to 'adb root'"
subprocess.call(["adb", "root"])
userName = subprocess.check_output(["adb", "shell", "whoami"]).strip()
if userName != "root":
print "ERROR: cannot set 'adb root'"
return False
return True