setTimeout: Difference between revisions

Jump to navigation Jump to search
507 bytes added ,  31 January 2024
no edit summary
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 13: Line 13:
|returnInfo = a handle to the timer
|returnInfo = a handle to the timer
|returnFail1 = null n/a
|returnFail1 = null n/a
|notes = Any durations less than 50 milliseconds aren't guaranteed to be called due to server process rate. 50 milliseconds is the minimum duration for performance reasons.
|notes = GTA Connected guarantees that the timer will be triggered after at least the interval you specify. The resolution of the timer is tied to the frame rate (server side and client-side). All the overdue timers are triggered at a single point each frame. This means that if, for example, the player is running at 30 frames per second, then two timers specified to occur after 100ms and 110ms would more than likely occur during the same frame, as the difference in time between the two timers (10ms) is less than half the length of the frame (33ms). As with most timers provided by other languages, you shouldn't rely on the timer triggering at an exact point in the future.
}}
}}
2,743

edits

Navigation menu