Hi Murrati.
Can you simply subract the difference?
For example, create a Constant?
I'm not sure which timer function you are referring to. The VB function which counts seconds from midnight? 0 to 86,399?
Maybe this example will help you...
Sub Test calls for a five second delay
by passing the value 5 to LenTime in sub SD
The function UTC_Timer takes the value
of the current Computer timer and re-arranges
it according to your constant, TimeDifference.
I am 4 hours behind GMT. Therefore TimeDifference
will = 14400. Or 60 Seconds * 60 Minutes * 4 Hours
Change to suit...
I hope this helps you,
Tom
'reflect my computer's 4 hours behind GMT
Public Const TimeDifference As Long = 14400
Sub Test()
SD 5
End Sub
Sub SD(LenTime)
Dim Start
Start = UTC_Timer(Timer)
Do While UTC_Timer(Timer)< Start + LenTime
DoEvents
Loop
End Sub
Public Function UTC_Timer(ComputerTimer As Long)
If ComputerTimer - TimeDifference< 0 Then
UTC_Timer = 86399 - Abs(ComputerTimer - TimeDifference)
Else: UTC_Timer = ComputerTimer - TimeDifference
End If
End Function
This message was edited by TsTom on 2002-04-23 21:56