From d794c4c0d8a83b454edefeed25b1c45279190445 Mon Sep 17 00:00:00 2001 From: softworkz Date: Fri, 12 Jun 2020 03:56:07 +0200 Subject: [PATCH 1/3] Add DispatcherTimer to the list of available timer classes This is just meant to be a hint. Why is there's no feedback section at the bottom? Feel free to close this and do it in a better way. --- xml/System.Threading/Timer.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml/System.Threading/Timer.xml b/xml/System.Threading/Timer.xml index f4abfb3d560..99fdf4bea5a 100644 --- a/xml/System.Threading/Timer.xml +++ b/xml/System.Threading/Timer.xml @@ -80,12 +80,13 @@ Sub TimerCallback(state As Object) The timer delegate is specified when the timer is constructed, and cannot be changed. The method does not execute on the thread that created the timer; it executes on a thread supplied by the system. > [!TIP] -> .NET includes four classes named `Timer`, each of which offers different functionality: +> .NET includes five classes named `Timer`, each of which offers different functionality: > > - , which fires an event and executes the code in one or more event sinks at regular intervals. The class is intended for use as a server-based or service component in a multithreaded environment; it has no user interface and is not visible at runtime. > - , which executes a single callback method on a thread pool thread at regular intervals. The callback method is defined when the timer is instantiated and cannot be changed. Like the class, this class is intended for use as a server-based or service component in a multithreaded environment; it has no user interface and is not visible at runtime. > - (.NET Framework only), a Windows Forms component that fires an event and executes the code in one or more event sinks at regular intervals. The component has no user interface and is designed for use in a single-threaded environment; it executes on the UI thread. > - (.NET Framework only), an ASP.NET component that performs asynchronous or synchronous web page postbacks at a regular interval. +> - A timer that is integrated into the Dispatcher queue which is processed at a specified interval of time and at a specified priority. When you create a timer, you can specify an amount of time to wait before the first execution of the method (due time), and an amount of time to wait between subsequent executions (period). The class has the same resolution as the system clock. This means that if the period is less than the resolution of the system clock, the delegate will execute at intervals defined by the resolution of the system clock, which is approximately 15 milliseconds on Windows 7 and Windows 8 systems. You can change the due time and period, or disable the timer, by using the method. From cda123ce698ffc7696c07536aeffc36f02acad9e Mon Sep 17 00:00:00 2001 From: softworkz Date: Tue, 23 Jun 2020 01:44:46 +0200 Subject: [PATCH 2/3] Update xml/System.Threading/Timer.xml Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- xml/System.Threading/Timer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Threading/Timer.xml b/xml/System.Threading/Timer.xml index 99fdf4bea5a..6d9178ff0ad 100644 --- a/xml/System.Threading/Timer.xml +++ b/xml/System.Threading/Timer.xml @@ -86,7 +86,7 @@ Sub TimerCallback(state As Object) > - , which executes a single callback method on a thread pool thread at regular intervals. The callback method is defined when the timer is instantiated and cannot be changed. Like the class, this class is intended for use as a server-based or service component in a multithreaded environment; it has no user interface and is not visible at runtime. > - (.NET Framework only), a Windows Forms component that fires an event and executes the code in one or more event sinks at regular intervals. The component has no user interface and is designed for use in a single-threaded environment; it executes on the UI thread. > - (.NET Framework only), an ASP.NET component that performs asynchronous or synchronous web page postbacks at a regular interval. -> - A timer that is integrated into the Dispatcher queue which is processed at a specified interval of time and at a specified priority. +> - , a timer that's integrated into the `Dispatcher` queue. This timer is processed with a specified priority at a specified time interval. When you create a timer, you can specify an amount of time to wait before the first execution of the method (due time), and an amount of time to wait between subsequent executions (period). The class has the same resolution as the system clock. This means that if the period is less than the resolution of the system clock, the delegate will execute at intervals defined by the resolution of the system clock, which is approximately 15 milliseconds on Windows 7 and Windows 8 systems. You can change the due time and period, or disable the timer, by using the method. From 34a3fdec52928590350b2d3afafb1de17a10bb2d Mon Sep 17 00:00:00 2001 From: softworkz Date: Tue, 23 Jun 2020 01:45:01 +0200 Subject: [PATCH 3/3] Update xml/System.Threading/Timer.xml Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- xml/System.Threading/Timer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Threading/Timer.xml b/xml/System.Threading/Timer.xml index 6d9178ff0ad..f0baded0cfe 100644 --- a/xml/System.Threading/Timer.xml +++ b/xml/System.Threading/Timer.xml @@ -80,7 +80,7 @@ Sub TimerCallback(state As Object) The timer delegate is specified when the timer is constructed, and cannot be changed. The method does not execute on the thread that created the timer; it executes on a thread supplied by the system. > [!TIP] -> .NET includes five classes named `Timer`, each of which offers different functionality: +> .NET includes several timer classes, each of which offers different functionality: > > - , which fires an event and executes the code in one or more event sinks at regular intervals. The class is intended for use as a server-based or service component in a multithreaded environment; it has no user interface and is not visible at runtime. > - , which executes a single callback method on a thread pool thread at regular intervals. The callback method is defined when the timer is instantiated and cannot be changed. Like the class, this class is intended for use as a server-based or service component in a multithreaded environment; it has no user interface and is not visible at runtime.