OSSL_SLEEP(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸŒ™ OSSL_SLEEP(3ossl) πŸŒ™

okay bestie, welcome to the OSSL_SLEEP(3ossl) era of the OpenSSL man pages β€” yes, this is that one function that literally just... naps πŸ’€ and honestly? iconic.


✨ NAME ✨

OSSL_sleep β€” delay execution for a specified number of milliseconds. that's it. that's the whole job. she sleeps, she slays, she returns. πŸ›Œ


✨ SYNOPSIS ✨

#include <openssl/crypto.h>

void OSSL_sleep(uint64_t millis);

look at her. one include, one call, zero drama. πŸŽ€


✨ DESCRIPTION ✨

so OSSL_sleep() is this cute lil convenience function whose whole personality is delaying execution of the calling thread for (at least) millis milliseconds. like hitting snooze but for code πŸ’…

now, and this is the part where you gotta listen, bestie β€” the delay is not guaranteed. lowkey it's giving "i'll be there in five minutes" energy. it can be affected by:

  • system activity going on around you (other stuff on the machine being loud, basically) πŸŒ€
  • the time spent processing the call itself
  • limitations on the underlying system call parameter size
  • system timer granularity (the clock's resolution, not vibes)

and specifically, ngl, there are some built-in caps depending on where you're running this:

  • 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... you cannot ask Windows to nap for a century. she said no. periodt.


✨ RETURN VALUES ✨

OSSL_sleep() does not return any value. it returns nothing. void. no little status code, no gossip, no tea. it just does the sleep and dips πŸ™ˆ


✨ HISTORY ✨

OSSL_sleep() was added in OpenSSL 3.2. a relatively recent queen, but she's already main character energy πŸ‘‘


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>.

fr fr read the license before you go copying stuff, it's not a vibe to skip it 🫢

and that's the whole page, bestie β€” no cap, every single detail accounted for πŸ’–

✨ OSSL_SLEEP(3ossl) ✨ β€” from OpenSSL 3.5.0, dated 2026-09-25. sleep well, code bestie πŸŒΈπŸ¦‹πŸ’œ

πŸ“¦ where this page comes from