STRELAPSED(3ast) STRELAPSED(3ast)

# [NAME](#NAME)

strelapsed - parse elapsed time expression

# [SYNOPSIS](#SYNOPSIS)

unsigned long strelapsed(const char* buf, char\** next, int persec)

# [DESCRIPTION](#DESCRIPTION)

*strelapsed* returns a pointer to a string representation of the elapsed time for (count/persec) seconds. The two largest time units are used, limiting the return value length to at most 6 characters. The units are:

[**s**](#s)

seconds

[**m**](#m)

minutes

[**h**](#h)

hours

[**days**](#days)

[**weeks**](#weeks)

[**M**](#M)

months

[**Y**](#Y)

years

[**S**](#S)

scores

# [SEE ALSO](#SEE_ALSO)

[strelapsed(3)](/man/os/ksh/strelapsed.3)

# [CAVEATS](#CAVEATS)

The return value points to a static area that is overwritten on each call.

---

Document: strelapsed(3ast) from ksh 1.0.10-r37 (Chainguard OS)
Source: https://github.com/ksh93/ksh
