mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
3cc46df47b
commit
3d5a59bd15
@ -31,4 +31,4 @@ elif sys.platform == "darwin":
|
|||||||
shutil.copy("libpocketpy.dylib", "../libpocketpy.dylib")
|
shutil.copy("libpocketpy.dylib", "../libpocketpy.dylib")
|
||||||
else:
|
else:
|
||||||
shutil.copy("main", "../main")
|
shutil.copy("main", "../main")
|
||||||
# shutil.copy("libpocketpy.so", "../libpocketpy.so")
|
shutil.copy("libpocketpy.so", "../libpocketpy.so")
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
|
|
||||||
static bool get_ns(int64_t* out) {
|
static bool get_ns(int64_t* out) {
|
||||||
struct timespec tms;
|
struct timespec tms;
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
clock_gettime(CLOCK_REALTIME, &tms);
|
||||||
|
#else
|
||||||
/* The C11 way */
|
/* The C11 way */
|
||||||
if(!timespec_get(&tms, TIME_UTC)) {
|
timespec_get(&tms, TIME_UTC);
|
||||||
return py_exception(tp_OSError, "%s", "timespec_get() failed");
|
#endif
|
||||||
}
|
|
||||||
/* seconds, multiplied with 1 billion */
|
/* seconds, multiplied with 1 billion */
|
||||||
int64_t nanos = tms.tv_sec * NANOS_PER_SEC;
|
int64_t nanos = tms.tv_sec * NANOS_PER_SEC;
|
||||||
/* Add full nanoseconds */
|
/* Add full nanoseconds */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user