aboutsummaryrefslogtreecommitdiff
path: root/examples/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/select.c')
-rw-r--r--examples/select.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/select.c b/examples/select.c
index 6ede9b490a95..05f6a331fd4c 100644
--- a/examples/select.c
+++ b/examples/select.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Yubico AB. All rights reserved.
+ * Copyright (c) 2020-2022 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
@@ -23,7 +23,7 @@ nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
return (-1);
}
- Sleep(rqtp->tv_nsec / 1000000);
+ Sleep((DWORD)(rqtp->tv_sec * 1000) + (DWORD)(rqtp->tv_nsec / 1000000));
return (0);
}