Minor 32-bit fix cast to hrtime_t before the mutliply.
It's important to cast to hrtime_t before doing the multiply because the ts.tv_sec type is only 32-bits and we need to promote it to 64-bits.
This commit is contained in:
parent
49638d8388
commit
8a1c9a02fb
@ -63,7 +63,7 @@ __gethrtime(void) {
|
||||
struct timespec ts;
|
||||
|
||||
do_posix_clock_monotonic_gettime(&ts);
|
||||
return (hrtime_t)((ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
|
||||
return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(__gethrtime);
|
||||
|
Loading…
Reference in New Issue
Block a user