File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Raspberry . Timers
9
9
{
10
+ /// <summary>
11
+ /// Represents a high-resolution timer.
12
+ /// </summary>
10
13
public class HighResolutionTimer : ITimer
11
14
{
12
15
#region Fields
@@ -71,6 +74,18 @@ public Action Action
71
74
72
75
#region Methods
73
76
77
+ /// <summary>
78
+ /// Sleeps the specified delay.
79
+ /// </summary>
80
+ /// <param name="delay">The delay.</param>
81
+ public static void Sleep ( decimal delay )
82
+ {
83
+ if ( delay >= 100 )
84
+ Thread . Sleep ( ( int ) delay ) ;
85
+ else
86
+ Interop . bcm2835_delayMicroseconds ( ( uint ) ( delay * 1000 ) ) ;
87
+ }
88
+
74
89
/// <summary>
75
90
/// Starts this instance.
76
91
/// </summary>
@@ -125,11 +140,6 @@ private void ThreadProcess()
125
140
126
141
private void NoOp ( ) { }
127
142
128
- public static void Sleep ( decimal delay )
129
- {
130
- Interop . bcm2835_delayMicroseconds ( ( uint ) ( delay * 1000 ) ) ;
131
- }
132
-
133
143
#endregion
134
144
}
135
145
}
You can’t perform that action at this time.
0 commit comments