Timer 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
Timer 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| Timer(TimerCallback) |
새로 만든 Timer 개체를 상태 개체로 사용하여 무한 기간 및 무한 기한을 사용하여 클래스의 새 인스턴스 Timer 를 초기화합니다. |
| Timer(TimerCallback, Object, Int32, Int32) |
32비트 부가 정수를 사용하여 시간 간격을 지정하여 클래스의 |
| Timer(TimerCallback, Object, Int64, Int64) |
64비트 부가 정수로 시간 간격을 측정하여 클래스의 |
| Timer(TimerCallback, Object, TimeSpan, TimeSpan) |
값을 사용하여 |
| Timer(TimerCallback, Object, UInt32, UInt32) |
32비트 부호 없는 정수로 시간 간격을 측정하여 클래스의 |
Timer(TimerCallback)
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
public:
Timer(System::Threading::TimerCallback ^ callback);
public Timer(System.Threading.TimerCallback callback);
new System.Threading.Timer : System.Threading.TimerCallback -> System.Threading.Timer
Public Sub New (callback As TimerCallback)
매개 변수
- callback
- TimerCallback
TimerCallback 실행할 메서드를 나타내는 대리자입니다.
예제
다음 코드 예제에서는 타이머 자체를 상태 개체로 사용하여 새 타이머를 만듭니다. 이 Change 메서드는 타이머를 시작하는 데 사용됩니다. 타이머 콜백이 발생하면 상태 개체를 사용하여 타이머를 해제합니다.
using System;
using System.Threading;
public class Example
{
public static void Main()
{
// Create an instance of the Example class, and start two
// timers.
Example ex = new Example();
ex.StartTimer(2000);
ex.StartTimer(1000);
Console.WriteLine("Press Enter to end the program.");
Console.ReadLine();
}
public void StartTimer(int dueTime)
{
Timer t = new Timer(new TimerCallback(TimerProc));
t.Change(dueTime, 0);
}
private void TimerProc(object state)
{
// The state object is the Timer object.
Timer t = (Timer) state;
t.Dispose();
Console.WriteLine("The timer callback executes.");
}
}
Imports System.Threading
Public Class Example
Public Shared Sub Main()
' Create an instance of the Example class, and start two
' timers.
Dim ex As New Example()
ex.StartTimer(2000)
ex.StartTimer(1000)
Console.WriteLine("Press Enter to end the program.")
Console.ReadLine()
End Sub
Public Sub StartTimer(ByVal dueTime As Integer)
Dim t As New Timer(AddressOf TimerProc)
t.Change(dueTime, 0)
End Sub
Private Sub TimerProc(ByVal state As Object)
' The state object is the Timer object.
Dim t As Timer = CType(state, Timer)
t.Dispose()
Console.WriteLine("The timer callback executes.")
End Sub
End Class
설명
개체 자체를 상태 개체로 사용 Timer 하려는 경우 이 생성자를 호출합니다. 타이머를 만든 후 메서드를 Change 사용하여 간격 및 기한을 설정합니다.
이 생성자는 개체가 상태 개체에 할당되기 전에 첫 번째 콜백이 발생하지 않도록 하기 위해 첫 번째 콜백 이전의 Timer 무한 기한과 콜백 간의 무한 간격을 지정합니다.
지정된 callback 메서드는 스레드에서 ThreadPool 호출되므로 재진입해야 합니다. 타이머 간격이 메서드를 실행하는 데 필요한 시간보다 작거나 모든 스레드 풀 스레드가 사용 중이고 메서드가 여러 번 큐에 대기 중인 경우 두 스레드 풀 스레드에서 메서드를 동시에 실행할 수 있습니다.
적용 대상
Timer(TimerCallback, Object, Int32, Int32)
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
32비트 부가 정수를 사용하여 시간 간격을 지정하여 클래스의 Timer 새 인스턴스를 초기화합니다.
public:
Timer(System::Threading::TimerCallback ^ callback, System::Object ^ state, int dueTime, int period);
public Timer(System.Threading.TimerCallback callback, object state, int dueTime, int period);
public Timer(System.Threading.TimerCallback callback, object? state, int dueTime, int period);
new System.Threading.Timer : System.Threading.TimerCallback * obj * int * int -> System.Threading.Timer
Public Sub New (callback As TimerCallback, state As Object, dueTime As Integer, period As Integer)
매개 변수
- callback
- TimerCallback
TimerCallback 실행할 메서드를 나타내는 대리자입니다.
- state
- Object
콜백 메서드에서 사용할 정보가 들어 있는 개체 또는 null.
- dueTime
- Int32
호출되기 전에 callback 지연할 시간(밀리초)입니다. 타이머가 시작되지 않도록 지정 Infinite 합니다. 타이머를 즉시 시작하려면 0을 지정합니다.
예외
dueTime 또는 period 매개 변수가 음수이고 같Infinite지 않습니다.
매개 변수는 callback .입니다 null.
예제
다음 코드 예제에서는 대리자를 TimerCallback 만들고 클래스의 새 인스턴스를 초기화하는 방법을 보여 줍니다 Timer .
using System;
using System.Threading;
class TimerExample
{
static void Main()
{
// Create an AutoResetEvent to signal the timeout threshold in the
// timer callback has been reached.
var autoEvent = new AutoResetEvent(false);
var statusChecker = new StatusChecker(10);
// Create a timer that invokes CheckStatus after one second,
// and every 1/4 second thereafter.
Console.WriteLine("{0:h:mm:ss.fff} Creating timer.\n",
DateTime.Now);
var stateTimer = new Timer(statusChecker.CheckStatus,
autoEvent, 1000, 250);
// When autoEvent signals, change the period to every half second.
autoEvent.WaitOne();
stateTimer.Change(0, 500);
Console.WriteLine("\nChanging period to .5 seconds.\n");
// When autoEvent signals the second time, dispose of the timer.
autoEvent.WaitOne();
stateTimer.Dispose();
Console.WriteLine("\nDestroying timer.");
}
}
class StatusChecker
{
private int invokeCount;
private int maxCount;
public StatusChecker(int count)
{
invokeCount = 0;
maxCount = count;
}
// This method is called by the timer delegate.
public void CheckStatus(Object stateInfo)
{
AutoResetEvent autoEvent = (AutoResetEvent)stateInfo;
Console.WriteLine("{0} Checking status {1,2}.",
DateTime.Now.ToString("h:mm:ss.fff"),
(++invokeCount).ToString());
if(invokeCount == maxCount)
{
// Reset the counter and signal the waiting thread.
invokeCount = 0;
autoEvent.Set();
}
}
}
// The example displays output like the following:
// 11:59:54.202 Creating timer.
//
// 11:59:55.217 Checking status 1.
// 11:59:55.466 Checking status 2.
// 11:59:55.716 Checking status 3.
// 11:59:55.968 Checking status 4.
// 11:59:56.218 Checking status 5.
// 11:59:56.470 Checking status 6.
// 11:59:56.722 Checking status 7.
// 11:59:56.972 Checking status 8.
// 11:59:57.223 Checking status 9.
// 11:59:57.473 Checking status 10.
//
// Changing period to .5 seconds.
//
// 11:59:57.474 Checking status 1.
// 11:59:57.976 Checking status 2.
// 11:59:58.476 Checking status 3.
// 11:59:58.977 Checking status 4.
// 11:59:59.477 Checking status 5.
// 11:59:59.977 Checking status 6.
// 12:00:00.478 Checking status 7.
// 12:00:00.980 Checking status 8.
// 12:00:01.481 Checking status 9.
// 12:00:01.981 Checking status 10.
//
// Destroying timer.
Imports System.Threading
Public Module Example
Public Sub Main()
' Use an AutoResetEvent to signal the timeout threshold in the
' timer callback has been reached.
Dim autoEvent As New AutoResetEvent(False)
Dim statusChecker As New StatusChecker(10)
' Create a timer that invokes CheckStatus after one second,
' and every 1/4 second thereafter.
Console.WriteLine("{0:h:mm:ss.fff} Creating timer." & vbCrLf,
DateTime.Now)
Dim stateTimer As New Timer(AddressOf statusChecker.CheckStatus,
autoEvent, 1000, 250)
' When autoEvent signals, change the period to every half second.
autoEvent.WaitOne()
stateTimer.Change(0, 500)
Console.WriteLine(vbCrLf & "Changing period to .5 seconds." & vbCrLf)
' When autoEvent signals the second time, dispose of the timer.
autoEvent.WaitOne()
stateTimer.Dispose()
Console.WriteLine(vbCrLf & "Destroying timer.")
End Sub
End Module
Public Class StatusChecker
Dim invokeCount, maxCount As Integer
Sub New(count As Integer)
invokeCount = 0
maxCount = count
End Sub
' The timer callback method.
Sub CheckStatus(stateInfo As Object)
Dim autoEvent As AutoResetEvent = DirectCast(stateInfo, AutoResetEvent)
invokeCount += 1
Console.WriteLine("{0:h:mm:ss.fff} Checking status {1,2}.",
DateTime.Now, invokeCount)
If invokeCount = maxCount Then
' Reset the counter and signal the waiting thread.
invokeCount = 0
autoEvent.Set()
End If
End Sub
End Class
' The example displays output like the following:
' 11:59:54.202 Creating timer.
'
' 11:59:55.217 Checking status 1.
' 11:59:55.466 Checking status 2.
' 11:59:55.716 Checking status 3.
' 11:59:55.968 Checking status 4.
' 11:59:56.218 Checking status 5.
' 11:59:56.470 Checking status 6.
' 11:59:56.722 Checking status 7.
' 11:59:56.972 Checking status 8.
' 11:59:57.223 Checking status 9.
' 11:59:57.473 Checking status 10.
'
' Changing period to .5 seconds.
'
' 11:59:57.474 Checking status 1.
' 11:59:57.976 Checking status 2.
' 11:59:58.476 Checking status 3.
' 11:59:58.977 Checking status 4.
' 11:59:59.477 Checking status 5.
' 11:59:59.977 Checking status 6.
' 12:00:00.478 Checking status 7.
' 12:00:00.980 Checking status 8.
' 12:00:01.481 Checking status 9.
' 12:00:01.981 Checking status 10.
'
' Destroying timer.
설명
매개 변수에 지정된 callback 대리자는 경과 후 dueTime 한 번 호출되고 그 이후에는 시간 간격이 period 경과할 때마다 호출됩니다.
0 dueTime 이면 callback 즉시 호출됩니다. 이 경우 dueTime 호출 Timeout.Infinite 되지 않고 타이머를 사용하지 않도록 설정하지만 메서드를 호출 callback 하여 다시 사용하도록 Change설정할 수 있습니다.
Timer 클래스는 Windows 7 및 Windows 8 시스템에서 약 15밀리초인 시스템 클록과 동일한 해상도를 가지므로 callback 대리자는 period 시스템 클록의 해상도보다 작은 경우 시스템 클록의 해상도로 정의된 간격으로 실행됩니다. 0이거나 periodTimeout.Infinite 호출되지 않은 dueTimeTimeout.Infinite경우 callback 한 번 호출됩니다. 타이머의 주기적 동작은 사용하지 않도록 설정되지만 메서드를 사용하여 Change 다시 사용하도록 설정할 수 있습니다.
메모
사용되는 시스템 클록은 GetTickCount에서 사용하는 것과 동일한 클록이며 timeBeginPeriod 및 timeEndPeriod로 변경된 내용은 영향을 받지 않습니다.
지정된 callback 메서드는 스레드에서 ThreadPool 호출되므로 재진입해야 합니다. 타이머 간격이 메서드를 실행하는 데 필요한 시간보다 작거나 모든 스레드 풀 스레드가 사용 중이고 메서드가 여러 번 큐에 대기 중인 경우 두 스레드 풀 스레드에서 메서드를 동시에 실행할 수 있습니다.
추가 정보
적용 대상
Timer(TimerCallback, Object, Int64, Int64)
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
64비트 부가 정수로 시간 간격을 측정하여 클래스의 Timer 새 인스턴스를 초기화합니다.
public:
Timer(System::Threading::TimerCallback ^ callback, System::Object ^ state, long dueTime, long period);
public Timer(System.Threading.TimerCallback callback, object? state, long dueTime, long period);
public Timer(System.Threading.TimerCallback callback, object state, long dueTime, long period);
new System.Threading.Timer : System.Threading.TimerCallback * obj * int64 * int64 -> System.Threading.Timer
Public Sub New (callback As TimerCallback, state As Object, dueTime As Long, period As Long)
매개 변수
- callback
- TimerCallback
TimerCallback 실행할 메서드를 나타내는 대리자입니다.
- state
- Object
콜백 메서드에서 사용할 정보가 들어 있는 개체 또는 null.
- dueTime
- Int64
호출되기 전에 callback 지연할 시간(밀리초)입니다. 타이머가 시작되지 않도록 지정 Infinite 합니다. 타이머를 즉시 시작하려면 0을 지정합니다.
예외
dueTime 또는 period 매개 변수가 음수이고 같Infinite지 않습니다.
dueTime 또는 period 매개 변수가 4294967294보다 큽합니다.
설명
매개 변수에 지정된 callback 대리자는 경과 후 dueTime 한 번 호출되고 그 이후에는 시간 간격이 period 경과할 때마다 호출됩니다.
0 dueTime 이면 callback 즉시 호출됩니다. 이 경우 dueTime 호출 Timeout.Infinite 되지 않고 타이머를 사용하지 않도록 설정하지만 메서드를 호출 callback 하여 다시 사용하도록 Change설정할 수 있습니다.
Timer 클래스는 Windows 7 및 Windows 8 시스템에서 약 15밀리초인 시스템 클록과 동일한 해상도를 가지므로 callback 대리자는 period 시스템 클록의 해상도보다 작은 경우 시스템 클록의 해상도로 정의된 간격으로 실행됩니다.
0이거나 periodTimeout.Infinite 호출되지 않은 dueTimeTimeout.Infinite경우 callback 한 번 호출됩니다. 타이머의 주기적 동작은 사용하지 않도록 설정되지만 메서드를 사용하여 Change 다시 사용하도록 설정할 수 있습니다.
메모
사용되는 시스템 클록은 GetTickCount에서 사용하는 것과 동일한 클록이며 timeBeginPeriod 및 timeEndPeriod로 변경된 내용은 영향을 받지 않습니다.
지정된 callback 메서드는 스레드에서 ThreadPool 호출되므로 재진입해야 합니다. 타이머 간격이 메서드를 실행하는 데 필요한 시간보다 작거나 모든 스레드 풀 스레드가 사용 중이고 메서드가 여러 번 큐에 대기 중인 경우 두 스레드 풀 스레드에서 메서드를 동시에 실행할 수 있습니다.
추가 정보
적용 대상
Timer(TimerCallback, Object, TimeSpan, TimeSpan)
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
값을 사용하여 Timer 시간 간격을 TimeSpan 측정하여 클래스의 새 인스턴스를 초기화합니다.
public:
Timer(System::Threading::TimerCallback ^ callback, System::Object ^ state, TimeSpan dueTime, TimeSpan period);
public Timer(System.Threading.TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period);
public Timer(System.Threading.TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period);
new System.Threading.Timer : System.Threading.TimerCallback * obj * TimeSpan * TimeSpan -> System.Threading.Timer
Public Sub New (callback As TimerCallback, state As Object, dueTime As TimeSpan, period As TimeSpan)
매개 변수
- callback
- TimerCallback
실행할 메서드를 나타내는 대리자입니다.
- state
- Object
콜백 메서드에서 사용할 정보가 들어 있는 개체 또는 null.
- dueTime
- TimeSpan
호출되기 전에 callback 지연할 시간입니다. 타이머가 시작되지 않도록 지정 InfiniteTimeSpan 합니다. 타이머를 즉시 시작하도록 지정 Zero 합니다.
- period
- TimeSpan
호출 사이의 시간 간격입니다 callback. 주기적 신호를 사용하지 않도록 지정 InfiniteTimeSpan 합니다.
예외
값 dueTime 이 음수이거나 period 같지 않거나 InfiniteInt32.MaxValue보다 큰 시간(밀리초)입니다.
매개 변수는 callback .입니다 null.
예제
다음 코드 예제에서는 대리자를 TimerCallback 만들고 클래스의 새 인스턴스를 초기화하는 방법을 보여 줍니다 Timer .
using System;
using System.Threading;
class TimerExample
{
static void Main()
{
AutoResetEvent autoEvent = new AutoResetEvent(false);
StatusChecker statusChecker = new StatusChecker(10);
// Create the delegate that invokes methods for the timer.
TimerCallback timerDelegate =
new TimerCallback(statusChecker.CheckStatus);
TimeSpan delayTime = new TimeSpan(0, 0, 1);
TimeSpan intervalTime = new TimeSpan(0, 0, 0, 0, 250);
// Create a timer that signals the delegate to invoke
// CheckStatus after one second, and every 1/4 second
// thereafter.
Console.WriteLine("{0} Creating timer.\n",
DateTime.Now.ToString("h:mm:ss.fff"));
Timer stateTimer = new Timer(
timerDelegate, autoEvent, delayTime, intervalTime);
// When autoEvent signals, change the period to every
// 1/2 second.
autoEvent.WaitOne(5000, false);
stateTimer.Change(new TimeSpan(0),
intervalTime + intervalTime);
Console.WriteLine("\nChanging period.\n");
// When autoEvent signals the second time, dispose of
// the timer.
autoEvent.WaitOne(5000, false);
stateTimer.Dispose();
Console.WriteLine("\nDestroying timer.");
}
}
class StatusChecker
{
int invokeCount, maxCount;
public StatusChecker(int count)
{
invokeCount = 0;
maxCount = count;
}
// This method is called by the timer delegate.
public void CheckStatus(Object stateInfo)
{
AutoResetEvent autoEvent = (AutoResetEvent)stateInfo;
Console.WriteLine("{0} Checking status {1,2}.",
DateTime.Now.ToString("h:mm:ss.fff"),
(++invokeCount).ToString());
if(invokeCount == maxCount)
{
// Reset the counter and signal Main.
invokeCount = 0;
autoEvent.Set();
}
}
}
Imports System.Threading
Public Class TimerExample
<MTAThread> _
Shared Sub Main()
Dim autoEvent As New AutoResetEvent(False)
Dim statusChecker As New StatusChecker(10)
' Create the delegate that invokes methods for the timer.
Dim timerDelegate As TimerCallback = _
AddressOf statusChecker.CheckStatus
Dim delayTime As New TimeSpan(0, 0, 1)
Dim intervalTime As New TimeSpan(0, 0, 0, 0, 250)
' Create a timer that signals the delegate to invoke
' CheckStatus after one second, and every 1/4 second
' thereafter.
Console.WriteLine("{0} Creating timer." & vbCrLf, _
DateTime.Now.ToString("h:mm:ss.fff"))
Dim stateTimer As Timer = New Timer( _
timerDelegate, autoEvent, delayTime, intervalTime)
' When autoEvent signals, change the period to every
' 1/2 second.
autoEvent.WaitOne(5000, False)
stateTimer.Change( _
new TimeSpan(0), intervalTime.Add(intervalTime))
Console.WriteLine(vbCrLf & "Changing period." & vbCrLf)
' When autoEvent signals the second time, dispose of
' the timer.
autoEvent.WaitOne(5000, False)
stateTimer.Dispose()
Console.WriteLine(vbCrLf & "Destroying timer.")
End Sub
End Class
Public Class StatusChecker
Dim invokeCount, maxCount As Integer
Sub New(count As Integer)
invokeCount = 0
maxCount = count
End Sub
' This method is called by the timer delegate.
Sub CheckStatus(stateInfo As Object)
Dim autoEvent As AutoResetEvent = _
DirectCast(stateInfo, AutoResetEvent)
invokeCount += 1
Console.WriteLine("{0} Checking status {1,2}.", _
DateTime.Now.ToString("h:mm:ss.fff"), _
invokeCount.ToString())
If invokeCount = maxCount Then
' Reset the counter and signal to stop the timer.
invokeCount = 0
autoEvent.Set()
End If
End Sub
End Class
설명
매개 변수에 지정된 callback 대리자는 경과 후 dueTime 한 번 호출되고 그 이후에는 시간 간격이 period 경과할 때마다 호출됩니다.
0 dueTime 이면 callback 즉시 호출됩니다. 음수(-1) 밀리초 dueTime 인 경우 callback 호출되지 않고 타이머를 사용하지 않도록 설정하지만 메서드를 호출 Change 하여 다시 사용하도록 설정할 수 있습니다.
Timer 클래스는 Windows 7 및 Windows 8 시스템에서 약 15밀리초인 시스템 클록과 동일한 해상도를 가지므로 callback 대리자는 period 시스템 클록의 해상도보다 작은 경우 시스템 클록의 해상도로 정의된 간격으로 실행됩니다. 0 또는 음수 1(-1) 밀리초이고 period 양수 dueTime 이면 callback 한 번 호출됩니다. 타이머의 정기적인 동작은 사용하지 않도록 설정되지만 메서드를 사용하여 Change 다시 사용하도록 설정할 수 있습니다.
메모
사용되는 시스템 클록은 GetTickCount에서 사용하는 것과 동일한 클록이며 timeBeginPeriod 및 timeEndPeriod로 변경된 내용은 영향을 받지 않습니다.
지정된 callback 메서드는 스레드에서 ThreadPool 호출되므로 재진입해야 합니다. 타이머 간격이 메서드를 실행하는 데 필요한 시간보다 작거나 모든 스레드 풀 스레드가 사용 중이고 메서드가 여러 번 큐에 대기 중인 경우 두 스레드 풀 스레드에서 메서드를 동시에 실행할 수 있습니다.
추가 정보
적용 대상
Timer(TimerCallback, Object, UInt32, UInt32)
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
- Source:
- Timer.cs
Important
이 API는 CLS 규격이 아닙니다.
32비트 부호 없는 정수로 시간 간격을 측정하여 클래스의 Timer 새 인스턴스를 초기화합니다.
public:
Timer(System::Threading::TimerCallback ^ callback, System::Object ^ state, System::UInt32 dueTime, System::UInt32 period);
[System.CLSCompliant(false)]
public Timer(System.Threading.TimerCallback callback, object? state, uint dueTime, uint period);
[System.CLSCompliant(false)]
public Timer(System.Threading.TimerCallback callback, object state, uint dueTime, uint period);
[<System.CLSCompliant(false)>]
new System.Threading.Timer : System.Threading.TimerCallback * obj * uint32 * uint32 -> System.Threading.Timer
Public Sub New (callback As TimerCallback, state As Object, dueTime As UInteger, period As UInteger)
매개 변수
- callback
- TimerCallback
실행할 메서드를 나타내는 대리자입니다.
- state
- Object
콜백 메서드에서 사용할 정보가 들어 있는 개체 또는 null.
- dueTime
- UInt32
호출되기 전에 callback 지연할 시간(밀리초)입니다. 타이머가 시작되지 않도록 지정 Infinite 합니다. 타이머를 즉시 시작하려면 0을 지정합니다.
- 특성
예외
dueTime 또는 period 매개 변수가 음수이고 같Infinite지 않습니다.
매개 변수는 callback .입니다 null.
설명
매개 변수에 지정된 callback 대리자는 경과 후 dueTime 한 번 호출되고 그 이후에는 시간 간격이 period 경과할 때마다 호출됩니다.
0 dueTime 이면 callback 즉시 호출됩니다. 이 경우 dueTime 호출 Timeout.Infinite 되지 않고 타이머를 사용하지 않도록 설정하지만 메서드를 호출 callback 하여 다시 사용하도록 Change설정할 수 있습니다.
Timer 클래스는 Windows 7 및 Windows 8 시스템에서 약 15밀리초인 시스템 클록과 동일한 해상도를 가지므로 callback 대리자는 period 시스템 클록의 해상도보다 작은 경우 시스템 클록의 해상도로 정의된 간격으로 실행됩니다. 0이거나 periodTimeout.Infinite 호출되지 않은 dueTimeTimeout.Infinite경우 callback 한 번 호출됩니다. 타이머의 주기적 동작은 사용하지 않도록 설정되지만 메서드를 사용하여 Change 다시 사용하도록 설정할 수 있습니다.
메모
사용되는 시스템 클록은 GetTickCount에서 사용하는 것과 동일한 클록이며 timeBeginPeriod 및 timeEndPeriod로 변경된 내용은 영향을 받지 않습니다.
지정된 callback 메서드는 스레드에서 ThreadPool 호출되므로 재진입해야 합니다. 타이머 간격이 메서드를 실행하는 데 필요한 시간보다 작거나 모든 스레드 풀 스레드가 사용 중이고 메서드가 여러 번 큐에 대기 중인 경우 두 스레드 풀 스레드에서 메서드를 동시에 실행할 수 있습니다.