Skip to content

Replace tick() with os.clock() - #224

Open
Lucatacos wants to merge 2 commits into
1ForeverHD:mainfrom
Lucatacos:patch-1
Open

Lucatacos wants to merge 2 commits into
1ForeverHD:mainfrom
Lucatacos:patch-1

Conversation

@Lucatacos

Copy link
Copy Markdown

Replace tick() with os.clock() for elapsed time measurement, as recommended by the Roblox documentation: https://create.roblox.com/docs/reference/engine/globals/RobloxGlobals#tick

Replace tick() with os.clock() for elapsed time measurement, as recommended by the Roblox documentation:
https://create.roblox.com/docs/reference/engine/globals/RobloxGlobals#tick

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Use a wall/game-elapsed timer and a non-debouncing initial sentinel to avoid incorrect click rejection.

1 open issue
What changed in this PR

Replaces deprecated tick() with os.clock() for icon-toggle debounce timing.

Changes:

  • Uses os.clock() to calculate elapsed time between toggle attempts.
  • Preserves the existing 100 ms debounce interval.
File Summary
src/​init.lua Replaces tick() in the icon-toggle debounce logic; the timer API and initial sentinel require correction for reliable behavior.

Review effort: Lite

Comment thread src/init.lua

@ryanlua ryanlua left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for contributing!

This branch has not been deployed

No deployments
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.

3 participants