The best alternative I've found is to accept units in the values, "5 seconds" or "5s". Then just "1" is an incorrect value.
[1] https://www.joelonsoftware.com/2005/05/11/making-wrong-code-...
I don't want to have a type for an integer in seconds, a type for an integer in minutes, a type for an integer in days, and so forth.
Just like I don't want to have a type for a float that means width, and another type for a float that means height.
Putting the unit (as oppose to the data type) in the variable name is helpful, and is not the same as types.
For really complicated stuff like dates, sure make a type or a class. But for basic dimensional values, that's going way overboard.
This is not how a typical Duration type works.
https://pkg.go.dev/time#Duration
https://doc.rust-lang.org/nightly/core/time/struct.Duration....