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

Float instead of a int for the min timer value ? #13

Closed
Huluti opened this issue Nov 23, 2023 · 3 comments
Closed

Float instead of a int for the min timer value ? #13

Huluti opened this issue Nov 23, 2023 · 3 comments

Comments

@Huluti
Copy link
Contributor

Huluti commented Nov 23, 2023

Hello :)

Thank you for your bundle, very useful!

Just one suggestion, could you make the min value of the timer feature a float instead of a int to allow values below 1?

Because on my case for urlr.me, I would prefer a value like 0.3 or 0.4 to make sure we don't prevent a human from quickly reducing his link.

What do you think?

@curry684
Copy link
Member

I don't mind doing it, however I did make it an int on purpose as testing shows that over 90% of spam caught by the timer was submitted after 1 or 2 seconds. I don't think it'll actually help if you reduce it that low - roundtrips take longer than that for most connections.

@curry684
Copy link
Member

Just realized it needed to be fixed anyway because the lower values can get into rounding issues, with 1.1 second counted as 2 in extreme cases.

curry684 added a commit that referenced this issue Nov 24, 2023
@curry684
Copy link
Member

Added and released, let me know if you run into issues 😄

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

No branches or pull requests

2 participants