On Thu, Sep 12, 2013 at 06:23:22PM -0700, Paul Ingram wrote: > On Sep 11, 2013, at 10:39 PM, Ben Pfaff <b...@nicira.com> wrote: > > > It's reasonable enough. > > > > I didn't really like the %. format specification for this. It is > > inflexible--what if someone wants only tenths of a second or wants > > microseconds? It is also somewhat hard to parse since it uses % > > (naturally enough though). Anyway I thought about it for a minute and > > concluded that one can reasonably just replace '#' in the strftime() > > formatted output with fractional seconds, so that "%S.###" outputs > > milliseconds, "%S.#" outputs tenths, etc. Also this allows for > > formatting properly for cultures that prefer to use a comma for the > > decimal point. > > > > I made this change. > > > > Some indentation was weird (I think you indented with tabs instead of > > spaces and we must have different tab stops). I fixed it. > > > > NEWS and manpages needed an update. I did it. > > Ok, using ### works too. I like it. (I suppose something like %3. (or > choose a format character other than '.') would be the most > strftime-like.)
Yes, that would be a more natural strftime syntax. I think the one proposed here is probably OK too. (It seems unlikely that anyone has a desperate need for a # inside a date format.) > I made a small change to your ### scheme to require runs of > consecutive '#' characters and to reprint on each new run. > > So given seconds and milliseconds of 12.789, the format string "%S.# > %S.###" will produce "12.7 12.789" (instead of "12.7 12.890" where the > 789 is spread across the two runs of '#' characters). OK, I'm fine with that version too. I'll apply this soon. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev