forked from beeware/voc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added implementation of Android platform module.
- Loading branch information
1 parent
068fdcf
commit f07cad6
Showing
3 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
package python; | ||
|
||
import android.os.Debug; | ||
|
||
|
||
class AndroidPlatform implements python.PythonPlatform { | ||
public AndroidPlatform() {} | ||
|
||
public long clock() { | ||
throw new org.python.exceptions.NotImplementedError("Android platform not implemented yet"); | ||
return Debug.threadCpuTimeNanos(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
package python; | ||
|
||
interface PythonPlatform { | ||
/** | ||
* Return the number of CPU nanoseconds that this thread has consumed. | ||
*/ | ||
public long clock(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters