Hi!
During usage of metalog I've had the wish to have a more precise timestamps than seconds.
By looking over the busybox code (coreutils/date.c) I've found an example how nanoseconds can be implemented.
Therefore I adopted the busybox snippet a little and tested this snippet positively (in a seperate test binary I'v also tested with valgrind: No leaks are possible...).
With this pull request it's possible to use %[nnn]N as conversion specification where nnn is optional. By default all 9 numbers are printed. By using nnn < 9 one can shorten it to e.g. milliseconds by using %3N.
Hi! During usage of metalog I've had the wish to have a more precise timestamps than seconds. By looking over the busybox code (coreutils/date.c) I've found an example how nanoseconds can be implemented.
Therefore I adopted the busybox snippet a little and tested this snippet positively (in a seperate test binary I'v also tested with valgrind: No leaks are possible...).
With this pull request it's possible to use %[nnn]N as conversion specification where nnn is optional. By default all 9 numbers are printed. By using nnn < 9 one can shorten it to e.g. milliseconds by using %3N.
Would be nice to have it merged here :-)
Cheers Roman