On Tue, 5 May 2015, Arnd Bergmann wrote:
> Your conversion looks entirely correct, but the original code is a bit
> odd here as it does not use the entire range of the 32-bit microsecond
> value, and counts from 0 to 409600us instead of the more intuitive
> 0 to 4294967296 us range before wrap
On Tue, 05 May 2015 11:24:16 +0200
Arnd Bergmann wrote:
> On Tuesday 05 May 2015 11:44:33 Tina Ruchandani wrote:
> > static inline unsigned int mon_get_timestamp(void)
> > {
> > - struct timeval tval;
> > + struct timespec64 now;
> > unsigned int stamp;
> >
> > - do_gettimeofday(&t
On Tuesday 05 May 2015 09:19:37 Pete Zaitcev wrote:
> On Tue, 05 May 2015 11:24:16 +0200
> Arnd Bergmann wrote:
>
> > On Tuesday 05 May 2015 11:44:33 Tina Ruchandani wrote:
>
> > > static inline unsigned int mon_get_timestamp(void)
> > > {
> > > - struct timeval tval;
> > > + struct timespec64
On Tuesday 05 May 2015 10:59:32 Alan Stern wrote:
> On Tue, 5 May 2015, Arnd Bergmann wrote:
>
> > Your conversion looks entirely correct, but the original code is a bit
> > odd here as it does not use the entire range of the 32-bit microsecond
> > value, and counts from 0 to 409600us instead
On Tuesday 05 May 2015 11:44:33 Tina Ruchandani wrote:
> 'struct timeval' uses 32-bits for its seconds field and will overflow in
> the year 2038 and beyond. This patch replaces the usage of 'struct timeval'
> in mon_get_timestamp() with timespec64 which uses a 64-bit seconds field
> and is y2038-s
'struct timeval' uses 32-bits for its seconds field and will overflow in
the year 2038 and beyond. This patch replaces the usage of 'struct timeval'
in mon_get_timestamp() with timespec64 which uses a 64-bit seconds field
and is y2038-safe. mon_get_timestamp() truncates the timestamp at 4096 second
6 matches
Mail list logo