mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
eb280910c9
commit
ab4ff49eda
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#define NANOS_PER_SEC 1000000000
|
#define NANOS_PER_SEC 1000000000
|
||||||
|
|
||||||
|
#ifndef __circle__
|
||||||
int64_t time_ns() {
|
int64_t time_ns() {
|
||||||
struct timespec tms;
|
struct timespec tms;
|
||||||
#ifdef CLOCK_REALTIME
|
#ifdef CLOCK_REALTIME
|
||||||
@ -18,6 +19,11 @@ int64_t time_ns() {
|
|||||||
nanos += tms.tv_nsec;
|
nanos += tms.tv_nsec;
|
||||||
return nanos;
|
return nanos;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
int64_t time_ns() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool time_time(int argc, py_Ref argv) {
|
static bool time_time(int argc, py_Ref argv) {
|
||||||
PY_CHECK_ARGC(0);
|
PY_CHECK_ARGC(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user