OSSL_SLEEP(3SSL)

✨ OSSL_SLEEP ✨

okay bestie, welcome to the OSSL_sleep page, part of the 3SSL manual gang 🫢 this is a tiny one but it's lowkey iconic for what it does.


πŸ’€ NAME

OSSL_sleep β€” delay execution for a specified number of milliseconds


🌸 SYNOPSIS

#include <openssl/crypto.h>

void OSSL_sleep(uint64_t millis);

πŸŽ€ DESCRIPTION

okay so OSSL_sleep() is a lil convenience function that delays execution of the calling thread for (at least) millis milliseconds. note the "at least" bestie, because the delay is not guaranteed πŸ’€

it's very much giving "we'll get there when we get there" β€” the actual timing can be affected by:

  • system activity
  • the time spent processing the call itself
  • limitation on the underlying system call parameter size
  • system timer granularity

and specifically, the ceilings are wild:

  • on Windows, the maximum amount of time it will sleep is 49 days
  • on systems where the regular sleep(3) is used as the underlying system call, the maximum sleep time is about 136 years 😭

so like... technically you could sleep longer than your laptop will ever live. slay.


⭐ RETURN VALUES

OSSL_sleep() does not return any value. nothing. void. it simply goes to sleep and comes back. no notes. πŸ’…


πŸ¦‹ HISTORY

OSSL_sleep() was added in OpenSSL 3.2. so if your OpenSSL is older than that, this function is not going to show up, sorry bestie πŸ™ˆ


Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the whole page!! this was OSSL_SLEEP(3SSL) from 4.0.3, dated 2026-09-29 β€” go take a nap, you've earned it πŸ˜ŒπŸ’–

πŸ“¦ where this page comes from