SNOBOL4TIME(3)
β¨ SNOBOL4TIME(3) β¨
okay bestie, welcome to the CSNOBOL4 manual, section 3, and today's main character is snobol4time β it's the page all about SNOBOL4's time functions π
πΈ NAME πΈ
snobol4time β SNOBOL4 time functions β°β¨
π SYNOPSIS π
-INCLUDE 'time.sno'
like, that's the whole vibe. one include line and you're in π«Ά
π DESCRIPTION π
okay so here's the roster, and every single one of these eats:
GETTIMEOFDAY() π°οΈ
this one returns a DATA() object of type TIMEVAL with these members:
TV_SECβ seconds since1/1/1970GMT βTV_NSECβ nanoseconds since start of day, starting inCSNOBOL4 2.2π
and for compatibility with older versions of CSNOBOL:
TV_USECcontains microseconds since start of day π (yes, the docs really do say that)
LOCALTIME(sec) π
takes seconds since 1/1/1970, and returns a DATA() object of type TM with the following members:
TM_SECβ seconds since start of local minute (0 to 60)TM_MINβ minutes since start of local hour (0 to 59)TM_HOURβ hours since start of local day (0 to 23)TM_MDAYβ day of month (1 to 31)TM_MONβ month of year (0 to 11)TM_YEARβ year minus 1900TM_WDAYβ day of week (sunday = 0)TM_YDAYβ day of year (0 to 365)TM_ISDSTβ is non-zero if summer time in effect at that timeTM_GMTOFFβ offset from UTC in seconds (or-1if not available)
GMTIME(sec) π
converts seconds to a TM object, but without any local time zone adjustments. no local drama, just pure UTC energy β¨
MKTIME(tm) π
converts the TM object representing a date/time in the current timezone setting to seconds since 1/1/1970 UTC.
TIMEGM(tm) π
converts the TM object representing a UTC date/time to seconds since 1/1/1970 UTC.
SLEEP(fp_sec) π΄
suspends program execution for a number of (floating point) seconds.
ngl bestie, this one is a little unhinged across platforms: not all platforms may support sleep, or sleep for fractional seconds. sleep resolution may vary between platforms. and it may return failure if the system indicated the sleep time was less than the requested time π
STRFTIME(format,tm) π
formats the date information in tm according to the format string. consult your local strftime(3) manual page (or C runtime manual) for more details π
STRPTIME(str,format) π
parses a string using using the supplied format and returns a TM object with the parsed elements filled in. consult your local strptime(3) manual page (or C runtime manual) for more details π
(yes, "using using" β we keep the lore exactly as it was written, no cap π«Ά)
π¦ SEE ALSO π¦
π AUTHOR π
Philip L. Budne π
and that's the whole page, bestie!! this one's from CSNOBOL4B 2.3.1, dated March 31, 2022 β so it's vintage but still slaying, fr fr πΈβ¨π
π¦ where this page comes from
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms