[ZendTo] Feature request: optional units on some preferences
John Thurston
john.thurston at alaska.gov
Thu Dec 10 17:29:14 GMT 2020
On 12/10/2020 7:55 AM, Jules via ZendTo wrote:
> Only other option is to infer whether it's a byte count or a time
> duration from the name of the setting
That's where I'd go. As I mentioned, "Computers are good at doing math".
It's only a couple of lines of code, and it makes the end-user's (my)
life easier.
I don't mind overloading the letter 'm'. It has a strong, arched shape.
It can probably handle the load.
The suffixes would be:
:: For Size ::
k = 1024
m = 1024*1024
g = 1024*1024*1024
:: For Duration ::
s = 1
m = 60
h = 60*60
d = 60*60*24
w = 60*60*24*7
--
Do things because you should, not just because you can.
John Thurston 907-465-8591
John.Thurston at alaska.gov
Department of Administration
State of Alaska
More information about the ZendTo
mailing list