From e44d51c21fe2248a33ab8c760e1ac52c6f70d6fb Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 3 Nov 2021 17:24:30 -0400 Subject: luareference.rst: Clarify contract of as_hz, as_khz and as_mhz --- docs/source/techspecs/luareference.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/source/techspecs/luareference.rst b/docs/source/techspecs/luareference.rst index 7e8e1ea9dff..3cea683f547 100644 --- a/docs/source/techspecs/luareference.rst +++ b/docs/source/techspecs/luareference.rst @@ -106,13 +106,16 @@ t:as_double() Returns the time interval in seconds as a floating-point value. t:as_hz() Interprets the interval as a period and returns the corresponding frequency - in Hertz as a floating-point value. + in Hertz as a floating-point value. Returns zero if ``t.is_never`` is true. + The interval must not be zero. t:as_khz() Interprets the interval as a period and returns the corresponding frequency - kilohertz as a floating-point value. + kilohertz as a floating-point value. Returns zero if ``t.is_never`` is + true. The interval must not be zero. t:as_mhz() Interprets the interval as a period and returns the corresponding frequency - megahertz as a floating-point value. + megahertz as a floating-point value. Returns zero if ``t.is_never`` is + true. The interval must not be zero. t:as_ticks(frequency) Returns the interval as a whole number of periods at the specified frequency. The frequency is specified in Hertz. -- cgit v1.2.3