#[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
__jni_bindgen! {
public enum TimeUnit ("java/util/concurrent/TimeUnit") extends crate::java::lang::Enum {
#[cfg(any(feature = "all", all(feature = "java-util-concurrent-TimeUnit")))]
pub fn values<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, __jni_bindgen::ObjectArray<crate::java::util::concurrent::TimeUnit, crate::java::lang::Throwable>>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/concurrent/TimeUnit\0", "values\0", "()[Ljava/util/concurrent/TimeUnit;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-lang-String", feature = "java-util-concurrent-TimeUnit")))]
pub fn valueOf<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/util/concurrent/TimeUnit\0", "valueOf\0", "(Ljava/lang/String;)Ljava/util/concurrent/TimeUnit;\0");
__jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-util-concurrent-TimeUnit")))]
pub fn convert<'env>(&'env self, arg0: i64, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::TimeUnit>>) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "convert\0", "(JLjava/util/concurrent/TimeUnit;)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn toNanos<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "toNanos\0", "(J)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn toMicros<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "toMicros\0", "(J)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn toMillis<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "toMillis\0", "(J)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn toSeconds<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "toSeconds\0", "(J)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn toMinutes<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "toMinutes\0", "(J)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn toHours<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "toHours\0", "(J)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn toDays<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<i64, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "toDays\0", "(J)J\0");
__jni_env.call_long_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-lang-Object")))]
pub fn timedWait<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>, arg1: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "timedWait\0", "(Ljava/lang/Object;J)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", all(feature = "java-lang-Thread")))]
pub fn timedJoin<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Thread>>, arg1: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "timedJoin\0", "(Ljava/lang/Thread;J)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
pub fn sleep<'env>(&'env self, arg0: i64) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0)];
let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
let (__jni_class, __jni_method) = __jni_env.require_class_method("java/util/concurrent/TimeUnit\0", "sleep\0", "(J)V\0");
__jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
}
}
#[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
pub fn DAYS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "DAYS\0", "Ljava/util/concurrent/TimeUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
pub fn HOURS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "HOURS\0", "Ljava/util/concurrent/TimeUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
pub fn MICROSECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "MICROSECONDS\0", "Ljava/util/concurrent/TimeUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
pub fn MILLISECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "MILLISECONDS\0", "Ljava/util/concurrent/TimeUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
pub fn MINUTES<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "MINUTES\0", "Ljava/util/concurrent/TimeUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
pub fn NANOSECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "NANOSECONDS\0", "Ljava/util/concurrent/TimeUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
#[cfg(any(feature = "all", feature = "java-util-concurrent-TimeUnit"))]
pub fn SECONDS<'env>(env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::TimeUnit>> {
unsafe {
let (__jni_class, __jni_field) = env.require_class_static_field("java/util/concurrent/TimeUnit\0", "SECONDS\0", "Ljava/util/concurrent/TimeUnit;\0");
env.get_static_object_field(__jni_class, __jni_field)
}
}
}
}