Gordon,
It sounds like you want to use Sleep as Cor suggests:
Threading.Thread.Sleep(TheRelieveTimeInMilliSecond s)
To find TheRelieveTimeInMilliSeconds you can use simple subtraction.
Dim theDate As Date = #8/14/2006 10:30:00 AM#
Dim theTimeSpan As TimeSpan = theDate - DateTime.Now
System.Threading.Thread.Sleep(theTimeSpan)
NOTE: Sleeps accepts either a TimeSpan or a Integer. I find using the
TimeSpan above more "convenient".
If you need a Timer, and want to to start at a specific time, you can use
System.Threading.Timer, where you pass theTimeSPan from above to the dueTime
on the System.Threading.Timer constructor.
Dim timer As New System.Threading.Timer(AddressOf OnElapsed,
Nothing, theTimeSpan, period)
If you set the period parameter to -1 milliseconds the event will fire once.
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Gordon" <Go****@discussions.microsoft.comwrote in message
news:BB**********************************@microsof t.com...
| Hi;
|
| I am trying to give my CPU some relief from comparing a group of values to
| now() while looping through an array. I tried using the
windows.system.timer
| but i have been unable to find the correct interval that will allow a
match
| as in
| compare("08/14/2006 10:30:00 AM", Now) = 0. in the tick event.
|
| I tired looking into the server oriented timer but it only has an elasped
| event and that's not what I need.
|
| Do i even need a time to pause my CPU access ? Could I just not use a DO
| Loop to
| pause the iterations of my For next ?
|
| Thanks
|
| --
| Gordon