PRI_stime
George, Dario,
it being mostly used in scheduler code, and me considering it quite a bit easier to compare such big numbers when shown in hex I wonder:
Do you prefer this to stay PRId64, or would you accept it to be changed to PRIx64 (allowing it to be used in a few other places)?
Thanks, Jan
Quoted 6 lines · Jan Beulich
George, Dario,
it being mostly used in scheduler code, and me considering it quite a bit easier to compare such big numbers when shown in hex I wonder:
Do you prefer this to stay PRId64, or would you accept it to be changed to PRIx64 (allowing it to be used in a few other places)?
Personally I've never taken the time to familiarize myself with the magnitude of hex numbers vs decimal numbers; so in the case of time, I could easily see that 10000000 nanoseconds is about 1ms; but I don't have a good sense of how long 0x1000000 nanoseconds is. The fact that our times are based on base 10 instead of base 2 is I think as good an argument as any for leaving it as a decimal.
But I wouldn't oppose the change if Dario (or others) thought x64 was the way to go.
-George
Quoted 11 lines · George Dunlap
Quoted 6 lines · Jan Beulich
George, Dario,
it being mostly used in scheduler code, and me considering it quite a bit easier to compare such big numbers when shown in hex I wonder:
Do you prefer this to stay PRId64, or would you accept it to be changed to PRIx64 (allowing it to be used in a few other places)?Personally I've never taken the time to familiarize myself with the magnitude of hex numbers vs decimal numbers; so in the case of time, I could easily see that 10000000 nanoseconds is about 1ms; but I don't
A good example for doing it in hex. Less digits are less error prone. Your example would translate to 10ms. :-)
Quoted 1 line
have a good sense of how long
0x1000000nanoseconds is. The fact that
0x100000 is about 1 million. This helps a lot to get an idea of the magnitude.
Quoted 5 lines
our times are based on base 10 instead of base 2 is I think as good an argument as any for leaving it as a decimal.
But I wouldn't oppose the change if Dario (or others) thought x64 was the way to go.
+1 for hex.
Juergen
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 20.10.15 at 10:10, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
George, Dario,
it being mostly used in scheduler code, and me considering it quite a bit easier to compare such big numbers when shown in hex I wonder:
Do you prefer this to stay PRId64, or would you accept it to be changed to PRIx64 (allowing it to be used in a few other places)?
Quoted 6 lines
Personally I've never taken the time to familiarize myself with the magnitude of hex numbers vs decimal numbers; so in the case of time, I could easily see that 10000000 nanoseconds is about 1ms; but I don't have a good sense of how long
0x1000000nanoseconds is. The fact that our times are based on base 10 instead of base 2 is I think as good an argument as any for leaving it as a decimal.
Well, as long as the number of seconds the value represents is small, this indeed is a good argument for using dec. However, already when we get into the hour range we're talking about 12-digit values without any separators, and at least for me this means counting from either end to find a place where to put a mental separator. So if staying with dec, perhaps we should make these second based, i.e. <ssss>.<nnnnnnnnn>?
Jan
Quoted 14 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 20.10.15 at 10:10, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
George, Dario,
it being mostly used in scheduler code, and me considering it quite a bit easier to compare such big numbers when shown in hex I wonder:
Do you prefer this to stay PRId64, or would you accept it to be changed to PRIx64 (allowing it to be used in a few other places)?Quoted 6 lines
Personally I've never taken the time to familiarize myself with the magnitude of hex numbers vs decimal numbers; so in the case of time, I could easily see that 10000000 nanoseconds is about 1ms; but I don't have a good sense of how long
0x1000000nanoseconds is. The fact that our times are based on base 10 instead of base 2 is I think as good an argument as any for leaving it as a decimal.
Quoted 7 lines
Well, as long as the number of seconds the value represents is small, this indeed is a good argument for using dec. However, already when we get into the hour range we're talking about 12-digit values without any separators, and at least for me this means counting from either end to find a place where to put a mental separator. So if staying with dec, perhaps we should make these second based, i.e. <ssss>.<nnnnnnnnn>?
Having a custom %p for this would be very useful.
As for the original hex vs dec question, I am really not fussed, so long as we are consistent (which is not the case currently).
~Andrew
Quoted 24 lines
Quoted 1 line
Quoted 1 line · On 20.10.15 at 11:46, <[email protected]> wrote:
Quoted 14 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 20.10.15 at 10:10, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
George, Dario,
it being mostly used in scheduler code, and me considering it quite a bit easier to compare such big numbers when shown in hex I wonder:
Do you prefer this to stay PRId64, or would you accept it to be changed to PRIx64 (allowing it to be used in a few other places)?Quoted 6 lines
Personally I've never taken the time to familiarize myself with the magnitude of hex numbers vs decimal numbers; so in the case of time, I could easily see that 10000000 nanoseconds is about 1ms; but I don't have a good sense of how long
0x1000000nanoseconds is. The fact that our times are based on base 10 instead of base 2 is I think as good an argument as any for leaving it as a decimal.Quoted 7 lines
Well, as long as the number of seconds the value represents is small, this indeed is a good argument for using dec. However, already when we get into the hour range we're talking about 12-digit values without any separators, and at least for me this means counting from either end to find a place where to put a mental separator. So if staying with dec, perhaps we should make these second based, i.e. <ssss>.<nnnnnnnnn>?
Quoted 1 line
Having a custom %p for this would be very useful.
Yes, that's hat I was considering if we want to stay with decimal.
Jan
Quoted 13 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 20.10.15 at 10:10, <[email protected]> wrote:
Personally I've never taken the time to familiarize myself with the magnitude of hex numbers vs decimal numbers; so in the case of time, I
could easily see that 10000000 nanoseconds is about 1ms; but I don't
have a good sense of how long0x1000000nanoseconds is. The fact that
our times are based on base 10 instead of base 2 is I think as good an
argument as any for leaving it as a decimal.
Yep, for time, I personally prefer decimal too.
Quoted 8 lines
Well, as long as the number of seconds the value represents is small, this indeed is a good argument for using dec. However, already when we get into the hour range we're talking about 12-digit values without any separators, and at least for me this means counting from either end to find a place where to put a mental separator. So if staying with dec, perhaps we should make these second based, i.e. <ssss>.<nnnnnnnnn>?
This would be really useful, and I'd be fine with scheduling related PRI_stime to look like this. I think I really like it, actually.
It's what we do already for console timestamps, in case "=boot" is specified, isn't it?
Thanks and Regards,
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel