Jump to content
Sign in to follow this  
ArMaTeC

BIKIScheduler

Recommended Posts

More explanation about how FPS influences suspending

← Older revision Revision as of 15:51, 16 July 2017
Line 16: Line 16:
   
 
This means any script that ran as the 3ms runtime was reached will be paused in the middle of it's execution and depending on how many scripts are spawned it might take several frames till it will run again.
 
This means any script that ran as the 3ms runtime was reached will be paused in the middle of it's execution and depending on how many scripts are spawned it might take several frames till it will run again.
A while true loop with sleep started in scheduled environment therefore has little chance to follow with exact interval.  
+
A while true loop with sleep started in scheduled environment therefore has little chance to follow with exact interval, because [[Sleep]] only marks the script as done in the current frame and the next time the script is executed the engine will check if the sleep is over.
  +
This means at 20 FPS the time between one frame and the next is roughly 50ms. That would make a sleep 0.01 wait for atleast 0.05 seconds.This effect get's bigger when the fps get even lower and if the scheduler is so overfilled that your script only get's checked every few frames instead of every frame.
   
 
If you spawn a scheduled script it will only start to run in the next frame when the scheduler starts fresh again.
 
If you spawn a scheduled script it will only start to run in the next frame when the scheduler starts fresh again.

View the full article

Share this post


Link to post
Share on other sites
Sign in to follow this  

×

Important Information

City Life RPG mod for ARMA 3
Copyright © 2017 City Life RPG. All rights reserved.
Registered with the UK Copyright Service. Registration No: 284659128

Positive SSL on a transparent background ipv6 ready DMCA.com Protection Status