summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libhfcommon/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhfcommon/util.c b/libhfcommon/util.c
index c8616676..77d53672 100644
--- a/libhfcommon/util.c
+++ b/libhfcommon/util.c
@@ -250,7 +250,7 @@ void util_sleepForMSec(uint64_t msec) {
}
struct timespec ts = {
.tv_sec = msec / 1000U,
- .tv_nsec = msec % 1000U,
+ .tv_nsec = (msec % 1000U) * 1000000U,
};
TEMP_FAILURE_RETRY(nanosleep(&ts, &ts));
}