diff options
-rw-r--r-- | etnaviv/etnadrm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etnaviv/etnadrm.c b/etnaviv/etnadrm.c index 1f08ad4..4789993 100644 --- a/etnaviv/etnadrm.c +++ b/etnaviv/etnadrm.c @@ -273,9 +273,9 @@ static void etnadrm_convert_timeout(struct drm_etnaviv_timespec *ts, clock_gettime(CLOCK_MONOTONIC, &now); ts->tv_sec = now.tv_sec + timeout / 1000; - ts->tv_nsec = now.tv_nsec + (timeout % 1000) * 10000000; - if (ts->tv_nsec > 1000000000) { - ts->tv_nsec -= 1000000000; + ts->tv_nsec = now.tv_nsec + (timeout % 1000) * 1000 * 1000; + if (ts->tv_nsec > 1000 * 1000 * 1000) { + ts->tv_nsec -= 1000 * 1000 * 1000; ts->tv_sec += 1; } } |