Condividi tramite


Timer Constructors

Definition

Overloads

Timer()

Creates a new timer.

Timer(Boolean)

Creates a new timer whose associated thread may be specified to Thread#setDaemon run as a daemon.

Timer(String)

Creates a new timer whose associated thread has the specified name.

Timer(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Timer(String, Boolean)

Creates a new timer whose associated thread has the specified name, and may be specified to Thread#setDaemon run as a daemon.

Timer()

Creates a new timer.

[Android.Runtime.Register(".ctor", "()V", "")]
public Timer ();
Attributes

Remarks

Creates a new timer. The associated thread does notThread#setDaemon run as a daemon.

Java documentation for java.util.Timer.Timer().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Timer(Boolean)

Creates a new timer whose associated thread may be specified to Thread#setDaemon run as a daemon.

[Android.Runtime.Register(".ctor", "(Z)V", "")]
public Timer (bool isDaemon);
[<Android.Runtime.Register(".ctor", "(Z)V", "")>]
new Java.Util.Timer : bool -> Java.Util.Timer

Parameters

isDaemon
Boolean

true if the associated thread should run as a daemon.

Attributes

Remarks

Creates a new timer whose associated thread may be specified to Thread#setDaemon run as a daemon. A daemon thread is called for if the timer will be used to schedule repeating "maintenance activities", which must be performed as long as the application is running, but should not prolong the lifetime of the application.

Java documentation for java.util.Timer.Timer(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Timer(String)

Creates a new timer whose associated thread has the specified name.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public Timer (string? name);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Util.Timer : string -> Java.Util.Timer

Parameters

name
String

the name of the associated thread

Attributes

Exceptions

if name == null

Remarks

Creates a new timer whose associated thread has the specified name. The associated thread does notThread#setDaemon run as a daemon.

Added in 1.5.

Java documentation for java.util.Timer.Timer(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Timer(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected Timer (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Util.Timer : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.Timer

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Timer(String, Boolean)

Creates a new timer whose associated thread has the specified name, and may be specified to Thread#setDaemon run as a daemon.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Z)V", "")]
public Timer (string? name, bool isDaemon);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Z)V", "")>]
new Java.Util.Timer : string * bool -> Java.Util.Timer

Parameters

name
String

the name of the associated thread

isDaemon
Boolean

true if the associated thread should run as a daemon

Attributes

Exceptions

if name == null

Remarks

Creates a new timer whose associated thread has the specified name, and may be specified to Thread#setDaemon run as a daemon.

Added in 1.5.

Java documentation for java.util.Timer.Timer(java.lang.String, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to