com.ironcorelabs.sdk.Duration Maven / Gradle / Ivy
// Automatically generated by rust_swig
package com.ironcorelabs.sdk;
public final class Duration {
private Duration() {}
public static Duration from_millis(long millis) {
long ret = do_from_millis(millis);
Duration convRet = new Duration(InternalPointerMarker.RAW_PTR, ret);
return convRet;
}
private static native long do_from_millis(long millis);
public static Duration from_secs(long secs) {
long ret = do_from_secs(secs);
Duration convRet = new Duration(InternalPointerMarker.RAW_PTR, ret);
return convRet;
}
private static native long do_from_secs(long secs);
public final long getMillis() {
long ret = do_getMillis(mNativeObj);
return ret;
}
private static native long do_getMillis(long self);
public final long getSecs() {
long ret = do_getSecs(mNativeObj);
return ret;
}
private static native long do_getSecs(long self);
public synchronized void delete() {
if (mNativeObj != 0) {
do_delete(mNativeObj);
mNativeObj = 0;
}
}
@Override
protected void finalize() throws Throwable {
try {
delete();
}
finally {
super.finalize();
}
}
private static native void do_delete(long me);
/*package*/ Duration(InternalPointerMarker marker, long ptr) {
assert marker == InternalPointerMarker.RAW_PTR;
this.mNativeObj = ptr;
}
/*package*/ long mNativeObj;
}