You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
'
Function Faux_Timer As Dword
'Less calls to Timer?
Incr Faux_Timer_Ctr
If Faux_Timer_Ctr [COLOR="Blue"][b]= 101[/b][/COLOR] Then
Reset Faux_Timer_Ctr
Last_Timer_Set = Timer
End If
Function = Last_Timer_Set
End Function
'
I believe greater than is more expensive then equals. Does change above help the speed?
In the Life program, Timer is called hundreds of times a second. It's always been my understanding calls to Timer are "expensive" (CPU time eaters) so I thought maybe I could get around at least some of the cost by using
Code:
'
Function Faux_Timer As Dword
'Less calls to Timer?
Incr Faux_Timer_Ctr
If Faux_Timer_Ctr > 100 Then
Reset Faux_Timer_Ctr
Last_Timer_Set = Timer
End If
Function = Last_Timer_Set
End Function
'
and substituting "Faux_Timer" for "Timer" in the code but there isn't any appreciable times savings, slower even if anything.
Just another blind alley going up in smoke, I guess. {sigh}
============================================
People will not remember
what you did or what you said.
People will remember how you made them feel.
LadyHawke
============================================
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: