Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 May 2022 09:49:16 -0400
From:      "Farhan Khan" <farhan@farhan.codes>
To:        freebsd-drivers@freebsd.org
Subject:   What is timo from sleep(9) functions
Message-ID:  <86ee7ca4-01c3-41dc-bbe0-5e8576fa7d62@www.fastmail.com>

next in thread | raw e-mail | index | archive | help
--32c607a3a28b4d87af9861527bff80df
Content-Type: text/plain

Hi all,

Hopefully simple question:

What is the unit of the `int timeo` parameter in sleep(9)? Is it the timeout in milliseconds? Or would 1 mean a second?
Related, what does the `hz` variable mean and why is it used? I see instances of timo's in multiples of hz (ie, hz * 10). OpenGrok shows it defined in a few different places and its not clear to me which it is.

Thank you!
--
Farhan Khan
PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE


--32c607a3a28b4d87af9861527bff80df
Content-Type: text/html

<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi all,<br></div><div><br></div><div>Hopefully simple question:<br></div><div><br></div><div>What is the unit of the `int timeo` parameter in sleep(9)? Is it the timeout in milliseconds? Or would 1 mean a second?<br></div><div>Related, what does the `hz` variable mean and why is it used? I see instances of timo's in multiples of hz (ie, hz * 10). OpenGrok shows it defined in a few different places and its not clear to me which it is.<br></div><div><br></div><div>Thank you!<br></div><div id="sig100029512"><div class="signature">--<br></div><div class="signature">Farhan Khan<br></div><div class="signature">PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE<br></div></div><div><br></div><pre style="white-space: pre-wrap"></pre></body></html>
--32c607a3a28b4d87af9861527bff80df--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ee7ca4-01c3-41dc-bbe0-5e8576fa7d62>