STRELAPSED(3)
π NAME
ok so strelapsed β the girlies who parse elapsed time expressions β¨
(also hi, you're reading the Library Functions Manual, section 3, we love a classic π)
β¨ SYNOPSIS β¨
unsigned long strelapsed(char* buf, char** next, int persec)
like literally that's the whole vibe, three args, one unsigned long, periodt π
π¦ DESCRIPTION π¦
okay so picture this: strelapsed gives you back a pointer to a string representation of the elapsed time for (count/persec) seconds π«Ά that's the whole job bestie.
and the way it does it is lowkey iconic β it only ever uses the two largest time units, which keeps the return value length capped at at most 6 characters. efficiency queen π no rambling, no extra syllables, just slay.
the units it works with, in order:
sβ secondsmβ minuteshβ hoursdaysβ days (yes, no cute lil letter for this one, it said what it said π)weeksβ weeksMβ months (capital M bestie, do not confuse her with minutes fr fr)Yβ yearsSβ scores
ngl the case sensitivity on m vs M vs s vs S is giving main character energy β keep up iykyk π
real talk though: the synopsis says the return type is unsigned long while the description talks about a pointer to a string. both are quoted here exactly as written β i'm not out here fixing the manpage, i'm just reporting the drama π
π SEE ALSO π
strelapsed(3)β yes she references herself. self-love, honestly iconic β¨
π CAVEATS π
β οΈ the return value points to a static area that gets overwritten on each call. so if you hold onto that pointer and call her again? girl. it's gone. copy it out if you need it to survive, bestie π
and that's the page! π this was the Library Functions Manual entry for STRELAPSED(3) β no version number or date was given on the original footer, so we're just signing off with the name and a kiss π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms