Repository navigation
Expand file tree
/
Copy pathClock.xml
More file actions
209 lines (173 loc) · 9.54 KB
/
Copy pathClock.xml
File metadata and controls
209 lines (173 loc) · 9.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<Type Name="Clock" FullName="Microsoft.VisualBasic.Devices.Clock">
<TypeSignature Language="C#" Value="public class Clock" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi Clock extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.VisualBasic.Devices.Clock" />
<TypeSignature Language="VB.NET" Value="Public Class Clock" />
<TypeSignature Language="C++ CLI" Value="public ref class Clock" />
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides properties for accessing the current local time and Universal Coordinated Time (equivalent to Greenwich Mean Time) from the system clock.</summary>
<remarks>
<format type="text/markdown"><]
]]></format>
</remarks>
<altmember cref="T:Microsoft.VisualBasic.Devices.Computer" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Clock ();" />
<MemberSignature Language="ILAsm" Value=".method public specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.VisualBasic.Devices.Clock.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 Clock();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:Microsoft.VisualBasic.Devices.Clock" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GmtTime">
<MemberSignature Language="C#" Value="public DateTime GmtTime { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTime GmtTime" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.Devices.Clock.GmtTime" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property GmtTime As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:
 property DateTime GmtTime { DateTime get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see langword="Date" /> object that contains the current local date and time on the computer, expressed as a UTC (GMT) time.</summary>
<value>A <see langword="Date" /> object that contains the current date and time expressed as UTC (GMT) time.</value>
<remarks>
<format type="text/markdown"><]
]]></format>
</remarks>
<altmember cref="P:Microsoft.VisualBasic.Devices.Clock.LocalTime" />
<altmember cref="P:System.DateTime.UtcNow" />
</Docs>
</Member>
<Member MemberName="LocalTime">
<MemberSignature Language="C#" Value="public DateTime LocalTime { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTime LocalTime" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.Devices.Clock.LocalTime" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property LocalTime As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:
 property DateTime LocalTime { DateTime get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see langword="Date" /> object that contains the current local date and time on this computer.</summary>
<value>A <see langword="Date" /> object that contains the current local date and time.</value>
<remarks>
<format type="text/markdown"><]
]]></format>
</remarks>
<altmember cref="P:Microsoft.VisualBasic.Devices.Clock.GmtTime" />
<altmember cref="P:System.DateTime.Now" />
</Docs>
</Member>
<Member MemberName="TickCount">
<MemberSignature Language="C#" Value="public int TickCount { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 TickCount" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.Devices.Clock.TickCount" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TickCount As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 property int TickCount { int get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the millisecond count from the computer's system timer.</summary>
<value>An <see langword="Integer" /> containing the millisecond count from the computer's system timer.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `TickCount` property provides access to the computer's system timer, which runs when the computer is active. The timer resolution is not less than 500 milliseconds.
You can use this property to make your application's behavior dependent on the length of time it has been running, or you can use it to label events, both of which are independent of the computer's clock.
> [!CAUTION]
> When the value of the `TickCount` property reaches the maximum integer value (<xref:System.Int32.MaxValue>), it then jumps to the minimum integer value (<xref:System.Int32.MinValue>), a negative number, and continues to increment.
If the computer runs continuously, `TickCount` increments from zero to the maximum integer value in approximately 24.9 days.
The `TickCount` property increments only when the operating system is running; it pauses when the computer goes into certain power-saving modes, such as standby or hibernation. The `TickCount` property is unrelated to the computer's clock setting.
Use the <xref:Microsoft.VisualBasic.Devices.Clock.LocalTime%2A> property or <xref:Microsoft.VisualBasic.Devices.Clock.GmtTime%2A> property to obtain the current local date and time on this computer.
The `My.Computer.Clock.TickCount` property has the same behavior as the <xref:System.Environment.TickCount%2A?displayProperty=nameWithType> property.
## Availability by Project Type
|Project type|Available|
|-|-|
|Windows Application|**Yes**|
|Class Library|**Yes**|
|Console Application|**Yes**|
|Windows Control Library|**Yes**|
|Web Control Library|**Yes**|
|Windows Service|**Yes**|
|Web Site|**Yes**|
## Examples
The following example uses the `My.Computer.Clock.TickCount` property to run a task in a loop for a given number of seconds, even if the computer's system time changes while it runs.
[!code-vb[VbVbalrMyComputer#20](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrMyComputer/VB/Class1.vb#20)]
]]></format>
</remarks>
<altmember cref="P:System.Environment.TickCount" />
</Docs>
</Member>
</Members>
</Type>