Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common - New: updatePerFrameHandlerDelay #1689

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

OverlordZorn
Copy link

@OverlordZorn OverlordZorn commented Sep 7, 2024

When merged this pull request will:

New Function: cba_fnc_updatePerFrameHandlerDelay
New Function: cba_fnc_getPerFrameHandlerDelay

(Im happy to recieve suggestions re: function name)

@OverlordZorn OverlordZorn changed the title New Function: updatePerFrameHandlerDelay Common - New: updatePerFrameHandlerDelay Sep 7, 2024
@jokoho48
Copy link
Member

jokoho48 commented Sep 7, 2024

this should maybe also update the next Execution time else the next time it executes, it would still execute based on the previous delay

@OverlordZorn
Copy link
Author

this should maybe also update the next Execution time else the next time it executes, it would still execute based on the previous delay

could add a 3. param: _update next Execution time (bool) if its really needed, but i would need help to find figure out how.

@OverlordZorn
Copy link
Author

OverlordZorn commented Sep 9, 2024

15:56:20 "[CVO](debug)(TEST INIT) diag_tickTime: 432.1"
15:56:20 "Loop: 432.107"
15:56:21 "Loop: 433.107"
[...]
15:56:33 "Loop: 445.107"
15:56:34 "Loop: 446.109"
15:56:34 "[CVO](debug)(UpdateDelay) 1 -> 10 - diag_tickTime: 446.519"
15:56:35 "Loop: 447.107"
15:56:45 "Loop: 457.107"
15:56:55 "Loop: 467.107"
15:57:05 "Loop: 477.108"
15:57:10 "[CVO](debug)(UpdateDelay) 10 -> 1 - diag_tickTime: 482.759"
15:57:15 "Loop: 487.108"
15:57:16 "Loop: 488.107"
[...]

Hm... doesnt seem to take the desired effect?

nvm, i didnt set _updateExecutionTime to true :harold:

@OverlordZorn OverlordZorn changed the title Common - New: updatePerFrameHandlerDelay WIP - Common - New: updatePerFrameHandlerDelay Sep 9, 2024
@OverlordZorn
Copy link
Author

current version works as expected

16:43:39 "[CVO](debug)(TEST Start) _delay 1 - diag_tickTime: 99.727"
16:43:39 "Loop: 99.737"
16:43:40 "Loop: 100.737"
16:43:41 "Loop: 101.728"
16:43:42 "Loop: 102.737"
16:43:43 "Loop: 103.737"
16:43:44 "Loop: 104.728"
16:43:45 "Loop: 105.728"
16:43:46 "Loop: 106.728"
16:43:46 "[CVO](debug)(fnc_updatePerFrameHandlerDelay) _prvDelay: 1 - _newDelay: 10 - _prvDelta: 107.727 - _newDelta: 116.727 - _tickTime: 106.728"
16:43:56 "Loop: 116.737"
16:44:06 "Loop: 126.728"
16:44:09 "[CVO](debug)(fnc_updatePerFrameHandlerDelay) _prvDelay: 10 - _newDelay: 2 - _prvDelta: 136.727 - _newDelta: 129.728 - _tickTime: 129.728"
16:44:09 "Loop: 129.738"
16:44:11 "Loop: 131.738"
16:44:13 "Loop: 133.737"
16:44:15 "Loop: 135.738"
16:44:17 "Loop: 137.738"
16:44:19 "Loop: 139.738"
16:44:21 "Loop: 141.738"
16:44:23 "Loop: 143.739"
16:44:24 "[CVO](debug)(Test Stopped)diag_tickTime: 144.728"```

@OverlordZorn OverlordZorn changed the title WIP - Common - New: updatePerFrameHandlerDelay Common - New: updatePerFrameHandlerDelay Sep 9, 2024
having this as an optional parameter doesnt seem neccessary anymore
@OverlordZorn
Copy link
Author

would cba_fnc_setPerFrameHandlerDelay be better then cba_fnc_updatePerFrameHandlerDelay ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants