summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys.c b/sys.c
index 43eadc4..2d83522 100644
--- a/sys.c
+++ b/sys.c
@@ -145,7 +145,8 @@ rpc_cgi_password_set(struct ubus_context *ctx, struct ubus_object *obj,
if (n < 0)
return rpc_errno_status();
- usleep(100 * 1000);
+ const struct timespec req = {0, 100 * 1000 * 1000};
+ nanosleep(&req, NULL);
n = write(fds[1], blobmsg_data(tb[RPC_P_PASSWORD]),
blobmsg_data_len(tb[RPC_P_PASSWORD]) - 1);