Skip to content

Replace tick() with os.clock()#47

Merged
ryanlua merged 2 commits intoryanlua:mainfrom
Katrist:Edit_Init
Feb 6, 2024
Merged

Replace tick() with os.clock()#47
ryanlua merged 2 commits intoryanlua:mainfrom
Katrist:Edit_Init

Conversation

@Katrist
Copy link
Contributor

@Katrist Katrist commented Jan 20, 2024

Description

Improved code by removing deprecated objects

Changes Made

Replaced tick() with os.clock()

Checklist

  • I have tested these changes thoroughly.
  • I have reviewed my code for any potential errors or issues.
  • I have followed the code style guidelines for this project.

Additional Notes

Talks about why tick() is deprecated: https://devforum.roblox.com/t/luau-recap-june-2020/632346
In my testing tick() is also less performant, taking more time to get the current time.

Code of Conduct

By submitting this issue, I agree to follow the Code of Conduct.

@Katrist Katrist requested a review from ryanlua as a code owner January 20, 2024 01:38
@Katrist
Copy link
Contributor Author

Katrist commented Jan 20, 2024

On a side note, could you tell me how to upload files in a commit that fits the format of this codebase? I would like to implement a Signal library to replace BindableEvents for performance reasons, but I'm not sure how I would add the Signal module.

Sources: https://devforum.roblox.com/t/lua-signal-class-comparison-optimal-goodsignal-class/1387063

@ryanlua
Copy link
Owner

ryanlua commented Jan 20, 2024

On a side note, could you tell me how to upload files in a commit that fits the format of this codebase? I would like to implement a Signal library to replace BindableEvents for performance reasons, but I'm not sure how I would add the Signal module.

Sources: https://devforum.roblox.com/t/lua-signal-class-comparison-optimal-goodsignal-class/1387063

You would add a .lua file for a module script under src. Files ending in .client.lua are local scripts, .server.lua are normal scripts, and .lua are module scripts.

Additionally, you could just add this to src: https://gist.github.com/stravant/b75a322e0919d60dde8a0316d1f09d2f

@ryanlua ryanlua added this to the v1.3.0 milestone Jan 20, 2024
@ryanlua ryanlua added the enhancement New feature or request label Jan 21, 2024
Signed-off-by: Ryan Luu <ryan.luu@ryanluu.dev>
@ryanlua ryanlua merged commit 5f21868 into ryanlua:main Feb 6, 2024
@Katrist Katrist deleted the Edit_Init branch February 7, 2024 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants