timer.Create
Example
Creates a timer that has a 1 second delay and is only ran once (UniqueName1
), a timer that has a 2 second delay and is ran continuously (UniqueName2
), etc.
This shows the different ways you can interact with functions.
Output: inside -- 1 second
outside -- 2 seconds
outside -- 4 seconds
fun with timers! -- 5 seconds
outside -- 6 seconds
outside -- 8 seconds
Example
Creates a timer that has 0.01 second delay, to demonstrate that the "minimum" delay of a timer is locked at the tickrate period (1/66 seconds).
As the example below shows, by setting the delay rate to 1/100 (0.01 seconds), the difference in time between the iterations of the timer should be 0.01 seconds, but instead, it is 0.149 (1/66) seconds.
Output: Timer Iteration #1 had a delay of 0.014999389648438
Timer Iteration #2 had a delay of 0.014999389648438
Timer Iteration #3 had a delay of 0.014999389648438
Timer Iteration #4 had a delay of 0.0150146484375
Timer Iteration #5 had a delay of 0.014999389648438
Timer Iteration #6 had a delay of 0.014999389648438
Timer Iteration #7 had a delay of 0.014999389648438
Timer Iteration #8 had a delay of 0.014999389648438
Timer Iteration #9 had a delay of 0.014999389648438