Microsoft.Bcl.TimeProvider Provides an abstraction for time. Gets a that provides a clock based on , a time zone based on , a high-performance time stamp based on , and a timer based on . If the changes after the object is returned, the change will be reflected in any subsequent operations that retrieve . Initializes the . Gets a value whose date and time are set to the current Coordinated Universal Time (UTC) date and time and whose offset is Zero, all according to this 's notion of time. The default implementation returns . Gets a value that is set to the current date and time according to this 's notion of time based on , with the offset set to the 's offset from Coordinated Universal Time (UTC). Gets a object that represents the local time zone according to this 's notion of time. The default implementation returns . Gets the frequency of of high-frequency value per second. The default implementation returns . For a given TimeProvider instance, the value must be idempotent and remain unchanged. Gets the current high-frequency value designed to measure small time intervals with high accuracy in the timer mechanism. A long integer representing the high-frequency counter value of the underlying timer mechanism. The default implementation returns . Gets the elapsed time between two timestamps retrieved using . The timestamp marking the beginning of the time period. The timestamp marking the end of the time period. A for the elapsed time between the starting and ending timestamps. Gets the elapsed time since the value retrieved using . The timestamp marking the beginning of the time period. A for the elapsed time between the starting timestamp and the time of this call./> Creates a new instance, using values to measure time intervals. A delegate representing a method to be executed when the timer fires. The method specified for callback should be reentrant, as it may be invoked simultaneously on two threads if the timer fires again before or while a previous callback is still being handled. An object to be passed to the . This may be null. The amount of time to delay before is invoked. Specify to prevent the timer from starting. Specify to start the timer immediately. The time interval between invocations of . Specify to disable periodic signaling. The newly created instance. is null. The number of milliseconds in the value of or is negative and not equal to , or is greater than . The delegate specified by the callback parameter is invoked once after elapses, and thereafter each time the time interval elapses. If is zero, the callback is invoked immediately. If is -1 milliseconds, is not invoked; the timer is disabled, but can be re-enabled by calling the method. If is 0 or -1 milliseconds and is positive, is invoked once; the periodic behavior of the timer is disabled, but can be re-enabled using the method. The return instance will be implicitly rooted while the timer is still scheduled. captures the and stores that with the for use in invoking each time it's called. That capture can be suppressed with . Thin wrapper for a . We don't return a TimerQueueTimer directly as it implements IThreadPoolWorkItem and we don't want it exposed in a way that user code could directly queue the timer to the thread pool. We also use this instead of Timer because CreateTimer needs to return a timer that's implicitly rooted while scheduled. Used to create a instance returned from and uses the default implementation provided by which uses , , , and . Initializes the instance. Represents a timer that can have its due time and period changed. Implementations of , , and must all be thread-safe such that the timer instance may be accessed concurrently from multiple threads. Changes the start time and the interval between method invocations for a timer, using values to measure time intervals. A representing the amount of time to delay before invoking the callback method specified when the was constructed. Specify to prevent the timer from restarting. Specify to restart the timer immediately. The time interval between invocations of the callback method specified when the Timer was constructed. Specify to disable periodic signaling. if the timer was successfully updated; otherwise, . The or parameter, in milliseconds, is less than -1 or greater than 4294967294. It is the responsibility of the implementer of the ITimer interface to ensure thread safety. Provide extensions methods for operations with . The Microsoft.Bcl.TimeProvider library interfaces are intended solely for use in building against pre-.NET 8 surface area. If your code is being built against .NET 8 or higher, then this library should not be utilized. Creates a task that completes after a specified time interval. The with which to interpret . The to wait before completing the returned task, or to wait indefinitely. A cancellation token to observe while waiting for the task to complete. A task that represents the time delay. The argument is null. represents a negative time interval other than . Gets a that will complete when this completes, when the specified timeout expires, or when the specified has cancellation requested. The task for which to wait on until completion. The timeout after which the should be faulted with a if it hasn't otherwise completed. The with which to interpret . The to monitor for a cancellation request. The representing the asynchronous wait. It may or may not be the same instance as the current instance. The argument is null. The argument is null. represents a negative time interval other than . Gets a that will complete when this completes, when the specified timeout expires, or when the specified has cancellation requested. The task for which to wait on until completion. The timeout after which the should be faulted with a if it hasn't otherwise completed. The with which to interpret . The to monitor for a cancellation request. The representing the asynchronous wait. It may or may not be the same instance as the current instance. The argument is null. The argument is null. represents a negative time interval other than . Initializes a new instance of the class that will be canceled after the specified . The with which to interpret the . The time interval to wait before canceling this . The is negative and not equal to or greater than maximum allowed timer duration. that will be canceled after the specified . The countdown for the delay starts during the call to the constructor. When the delay expires, the constructed is canceled if it has not been canceled already. If running on .NET versions earlier than .NET 8.0, there is a constraint when invoking on the resultant object. This action will not terminate the initial timer indicated by . However, this restriction does not apply on .NET 8.0 and later versions. '{0}' must be a non-negative and non-zero value. '{0}' must be greater than or equal to '{1}'. '{0}' must be less than or equal to '{1}'. The operation cannot be performed when TimeProvider.LocalTimeZone is null. The operation cannot be performed when TimeProvider.TimestampFrequency is zero or negative. Attribute used to indicate a source generator should create a function for marshalling arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time. This attribute is meaningless if the source generator associated with it is not enabled. The current built-in source generator only supports C# and only supplies an implementation when applied to static, partial, non-generic methods. Initializes a new instance of the . Name of the library containing the import. Gets the name of the library containing the import. Gets or sets the name of the entry point to be called. Gets or sets how to marshal string arguments to the method. If this field is set to a value other than , must not be specified. Gets or sets the used to control how string arguments to the method are marshalled. If this field is specified, must not be specified or must be set to . Gets or sets whether the callee sets an error (SetLastError on Windows or errno on other platforms) before returning from the attributed method. Specifies how strings should be marshalled for generated p/invokes Indicates the user is suppling a specific marshaller in . Use the platform-provided UTF-8 marshaller. Use the platform-provided UTF-16 marshaller. Specifies that null is allowed as an input even if the corresponding type disallows it. Specifies that null is disallowed as an input even if the corresponding type allows it. Specifies that an output may be null even if the corresponding type disallows it. Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns. Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter may be null. Gets the return value condition. Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter will not be null. Gets the return value condition. Specifies that the output will be non-null if the named parameter is non-null. Initializes the attribute with the associated parameter name. The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null. Gets the associated parameter name. Applied to a method that will never return under any circumstance. Specifies that the method will not return if the associated Boolean parameter is passed the specified value. Initializes the attribute with the specified parameter value. The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to the associated parameter matches this value. Gets the condition parameter value. Specifies that the method or property will ensure that the listed field and property members have not-null values. Initializes the attribute with a field or property member. The field or property member that is promised to be not-null. Initializes the attribute with the list of field and property members. The list of field and property members that are promised to be not-null. Gets field or property member names. Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition. Initializes the attribute with the specified return value condition and a field or property member. The return value condition. If the method returns this value, the associated parameter will not be null. The field or property member that is promised to be not-null. Initializes the attribute with the specified return value condition and list of field and property members. The return value condition. If the method returns this value, the associated parameter will not be null. The list of field and property members that are promised to be not-null. Gets the return value condition. Gets field or property member names.