sindresorhus / pretty-ms

Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`
MIT License
1.08k stars 65 forks source link

Add option to format microseconds and nanoseconds #25

Closed mees- closed 6 years ago

mees- commented 6 years ago

Also added an option to force ms to be formatted separately from seconds

Closes #24

FireController1847 commented 6 years ago

but why

mees- commented 6 years ago

@FireController1847 why what?

FireController1847 commented 6 years ago

why would you need to pretty ms microseconds and nanoseconds

mees- commented 6 years ago

because i want to show users times in a nice format and the times are less than a millisecond

FireController1847 commented 6 years ago

I just don't see a use case for this... What does your program do that requires microsecond and millisecond precision?

mees- commented 6 years ago

I'm working on a benchmarking thing, that has that kind of times

sindresorhus commented 6 years ago

@mees- Can you fix the merge conflict?

mees- commented 6 years ago

@sindresorhus I have added the test case and resolved the merge confict. I have also fixed a bug that was caught by the addition of that test case.