aboutsummaryrefslogtreecommitdiffstats
path: root/java_jni/jni
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-01 22:41:36 +0100
committerSven Gothel <[email protected]>2023-01-01 22:41:36 +0100
commit60f4bcf2e7525412f506a7d6110faff0064fcb8d (patch)
tree9037a8c91413b5917469bebb1caab0054ed00ec2 /java_jni/jni
parent854a714e64482644cd7c4efd4841ba3782f349a9 (diff)
basic_types.cpp/jau_sys_Clock.cxx: Fully qualify system calls using anonymous namespace, add include ctime if missing
Diffstat (limited to 'java_jni/jni')
-rw-r--r--java_jni/jni/jau/jau_sys_Clock.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/java_jni/jni/jau/jau_sys_Clock.cxx b/java_jni/jni/jau/jau_sys_Clock.cxx
index 07591ca..0e845f3 100644
--- a/java_jni/jni/jau/jau_sys_Clock.cxx
+++ b/java_jni/jni/jau/jau_sys_Clock.cxx
@@ -54,7 +54,7 @@ void Java_org_jau_sys_Clock_getMonotonicTimeImpl(JNIEnv *env, jclass clazz, jlon
throw jau::InternalError("GetPrimitiveArrayCritical(address val array) is null", E_FILE_LINE);
}
struct timespec t { 0, 0 };
- clock_gettime(CLOCK_MONOTONIC, &t);
+ ::clock_gettime(CLOCK_MONOTONIC, &t);
val_ptr[0] = (int64_t)t.tv_sec;
val_ptr[1] = (int64_t)t.tv_nsec;
} catch(...) {
@@ -78,7 +78,7 @@ void Java_org_jau_sys_Clock_getWallClockTimeImpl(JNIEnv *env, jclass clazz, jlon
throw jau::InternalError("GetPrimitiveArrayCritical(address val array) is null", E_FILE_LINE);
}
struct timespec t { 0, 0 };
- clock_gettime(CLOCK_REALTIME, &t);
+ ::clock_gettime(CLOCK_REALTIME, &t);
val_ptr[0] = (int64_t)t.tv_sec;
val_ptr[1] = (int64_t)t.tv_nsec;
} catch(...) {
@@ -99,7 +99,7 @@ jlong Java_org_jau_sys_Clock_currentTimeMillis(JNIEnv *env, jclass clazz) {
(void)clazz;
struct timespec t { 0, 0 };
- clock_gettime(CLOCK_MONOTONIC, &t);
+ ::clock_gettime(CLOCK_MONOTONIC, &t);
int64_t res = static_cast<int64_t>( t.tv_sec ) * MilliPerOne +
static_cast<int64_t>( t.tv_nsec ) / NanoPerMilli;
return (jlong)res;
@@ -110,7 +110,7 @@ jlong Java_org_jau_sys_Clock_wallClockSeconds(JNIEnv *env, jclass clazz) {
(void)clazz;
struct timespec t { 0, 0 };
- clock_gettime(CLOCK_REALTIME, &t);
+ ::clock_gettime(CLOCK_REALTIME, &t);
return (jlong)( static_cast<int64_t>( t.tv_sec ) );
}