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

Option to output sub-second as decimal seconds #63

Open
ulken opened this issue Dec 19, 2023 · 1 comment
Open

Option to output sub-second as decimal seconds #63

ulken opened this issue Dec 19, 2023 · 1 comment

Comments

@ulken
Copy link

ulken commented Dec 19, 2023

@sindresorhus Would you accept a PR that takes an option to keep the decimals on whole numbers? I'm using this library for a progress indicator thingy which keeps updating the time spent every ~60ms or so, and it keeps flickering in the terminal when it hits a whole number - I'd prefer if it just kept the fixed length as specified.

@sindresorhus For the same reason, I would find it preferable if sub-seconds could be output as seconds. I.e. 900ms -> 0.9s. Right now I'm wrapping pretty-ms and adding the logic myself, but does it qualify for an option to be included in the library?

Originally posted by @ulken in #20 (comment)

@sindresorhus
Copy link
Owner

PR welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants