mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 689316 - DeviceManagerADB needs a getCurrentTime function. r=jmaher
This commit is contained in:
parent
14aa3d77e7
commit
f4b39ee317
@ -449,7 +449,17 @@ class DeviceManagerADB(DeviceManager):
|
||||
# failure: None
|
||||
def updateApp(self, appBundlePath, processName=None, destPath=None, ipAddr=None, port=30000):
|
||||
return self.runCmd(["install", "-r", appBundlePath]).stdout.read()
|
||||
|
||||
|
||||
# external function
|
||||
# returns:
|
||||
# success: time in ms
|
||||
# failure: None
|
||||
def getCurrentTime(self):
|
||||
timestr = self.runCmd(["shell", "date", "+%s"]).stdout.read().strip()
|
||||
if (not timestr or not timestr.isdigit()):
|
||||
return None
|
||||
return str(int(timestr)*1000)
|
||||
|
||||
# Returns information about the device:
|
||||
# Directive indicates the information you want to get, your choices are:
|
||||
# os - name of the os
|
||||
|
Loading…
Reference in New Issue
Block a user