LibraryPrecisionTime
De DigiWiki.
(Page créée avec « This is a chunk of code to show you two things. 1) llSetTimerEvent's precision is ridiculously low. 2) You can easily improve the precision by setting the timer a bit short … ») |
|||
| Ligne 2 : | Ligne 2 : | ||
1) llSetTimerEvent's precision is ridiculously low. | 1) llSetTimerEvent's precision is ridiculously low. | ||
| + | |||
2) You can easily improve the precision by setting the timer a bit short and then waiting until your target time. | 2) You can easily improve the precision by setting the timer a bit short and then waiting until your target time. | ||
==== How do you use this script? ==== | ==== How do you use this script? ==== | ||
1) If you cut and paste this code into a script and put it into a box, it will send periodic messages displaying how far off llSetTimerEvent is from where it should be, in seconds. | 1) If you cut and paste this code into a script and put it into a box, it will send periodic messages displaying how far off llSetTimerEvent is from where it should be, in seconds. | ||
| + | |||
2) If you change the first line to "integer useprectimer = 1;" it will send periodic messages displaying how close a precision timer can get. | 2) If you change the first line to "integer useprectimer = 1;" it will send periodic messages displaying how close a precision timer can get. | ||
| + | |||
3) If you read the timer event at the bottom, and precTimer() function at the top, they demonstrate the precision timer. | 3) If you read the timer event at the bottom, and precTimer() function at the top, they demonstrate the precision timer. | ||


