projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d19251c
)
time: use correct size type for usecs
author
Jens Axboe
<axboe@fb.com>
Sun, 2 Apr 2017 22:01:18 +0000
(16:01 -0600)
committer
Jens Axboe
<axboe@fb.com>
Sun, 2 Apr 2017 22:01:18 +0000
(16:01 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
time.c
patch
|
blob
|
blame
|
history
diff --git
a/time.c
b/time.c
index f637afb51487f291f7413cae596e969b8491e084..279ee48492302ebd5a1080e5422cc48ecd6b7a59 100644
(file)
--- a/
time.c
+++ b/
time.c
@@
-8,11
+8,11
@@
static unsigned long ns_granularity;
void timeval_add_msec(struct timeval *tv, unsigned int msec)
{
- unsigned
int
adj_usec = 1000 * msec;
+ unsigned
long
adj_usec = 1000 * msec;
tv->tv_usec += adj_usec;
if (adj_usec >= 1000000) {
- unsigned
int
adj_sec = adj_usec / 1000000;
+ unsigned
long
adj_sec = adj_usec / 1000000;
tv->tv_usec -= adj_sec * 1000000;
tv->tv_sec += adj_sec;