Re: Internal time representations

2016-08-01 Thread Gedare Bloom
blocker for 8-bit ones (AVR). But they are >> >>>> not so common today. >> >>>> >> >>>> Conversion to timespec is significant problem. >> >>>> >> >>>> If the 34+30 bit compact timespec advantage of the faster conversion &g

Re: Internal time representations

2016-08-01 Thread Joel Sherrill
ATIVE to the same format. > >>>> > >>>> This simplifies clock_nanosleep logic and generally makes > >>>> code more readable and lowers space for mistakes. > >>>> > >>>> If we consider 64-bit linear format then we should think

Re: Internal time representations

2016-08-01 Thread Gedare Bloom
gt;>>> >>>> If we consider 64-bit linear format then we should think about >>>> conversion to 64+32 bit timespec to overcome 2038 year problem. >>>> This makes multiplication 64*32->64 which is more complex. >>>> The most of the upper 32-

Re: Internal time representations

2016-07-31 Thread Sebastian Huber
equirement to read expire value back by user in common POSIX APIs (at least I hope). Advantages of the ns64 is that conversion of user time formats (timespec, timeval, etc) to 64-bit nanoseconds is relatively efficient, and the internal time representations can be compared with easy logic. The

Re: Internal time representations

2016-07-28 Thread Gedare Bloom
SB bits of >> compacted timespec. >> >> On the other hand, conversion of generic time source (which needs scaling) >> to the compacted timespec is disaster. So I think that linear >> 64-bit (ns64) format is better at the end. >> >> But discussion and coun

Re: Internal time representations

2016-07-27 Thread Sebastian Huber
tc) to 64-bit nanoseconds is relatively efficient, and the internal time representations can be compared with easy logic. The ns64 allows for higher precision event triggers than score ticks. Furthermore, converting multiple time sources into ns64 is simpler to maintain consistent notion of time th

Re: Internal time representations

2016-07-27 Thread Chris Johns
On 28/07/2016 07:29, Pavel Pisa wrote: But discussion and counter examples are welcome. How do these time formats interact with time management protocol like NTP and PTP? We should consider NTP and PTP interfaces if we are reviewing how we manage time. I am not asking these be implemented

Re: Internal time representations

2016-07-27 Thread Pavel Pisa
timers which fire and user provided time, there is no requirement to read expire value back by user in common POSIX APIs (at least I hope). > Advantages of the ns64 is that conversion of user time formats > (timespec, timeval, etc) to 64-bit nanoseconds is relatively > efficient, and the internal ti

Internal time representations

2016-07-27 Thread Gedare Bloom
s that conversion of user time formats (timespec, timeval, etc) to 64-bit nanoseconds is relatively efficient, and the internal time representations can be compared with easy logic. The ns64 allows for higher precision event triggers than score ticks. Furthermore, converting multiple time sources int