-
Notifications
You must be signed in to change notification settings - Fork 0
Add builtin type for time duration #26
Copy link
Copy link
Open
Labels
breakingSomething that would be a alter existing logic or syntaxSomething that would be a alter existing logic or syntaxcompilerSomething regarding the compilerSomething regarding the compilerenhancementNew feature or requestNew feature or requestruntimeSomething regarding the runtime moduleSomething regarding the runtime modulestandard librarySomething regarding the standard librarySomething regarding the standard librarysyntaxSyntax support for a featureSyntax support for a feature
Metadata
Metadata
Assignees
Labels
breakingSomething that would be a alter existing logic or syntaxSomething that would be a alter existing logic or syntaxcompilerSomething regarding the compilerSomething regarding the compilerenhancementNew feature or requestNew feature or requestruntimeSomething regarding the runtime moduleSomething regarding the runtime modulestandard librarySomething regarding the standard librarySomething regarding the standard librarysyntaxSyntax support for a featureSyntax support for a feature
Type
Fields
Give feedbackNo fields configured for Feature.
Projects
StatusShow more project fields
Todo
Is your feature request related to a problem? Please describe.
Currently representing time durations are kinda confusing. For instance, some hypixel-native things expect ticks, and it is might not be clear for the user when to use what, especially that they can specify absolute tick values via int and translated ticks via duration constants (eg
1m3s).Describe the solution you'd like
Somehow differentiate ticks and millis/seconds. Possibly force actions to take in time duration instead of int. Remove implicit conversion from duration to int. Make this behaviour clear and precise.
Describe alternatives you've considered
Could introduce an enum for this eg
Interval::Ticks(ticks: int)or Interval::Duration(dur: duration)` but that might be too long.Additional context
Some short syntax would be awesome.