strelapsed(3)

strelapsed3

Parse elapsed time expression

Usage

$1$2unsigned long strelapsed(char* buf, char** next, int persec)unsigned long strelapsed(char* buf, char** next, int persec)unsigned long strelapsed(char* buf, char** next, int persec)unsigned long strelapsed(char* buf, char** next, int persec)unsigned long strelapsed(char* buf, char** next, int persec)unsigned long strelapsed(char* buf, char** next, int persec)unsigned long strelapsed(char* buf, char** next, int persec)unsigned long strelapsed(char* buf, char** next, int persec)

Overview

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

s

seconds

m

minutes

h

hours

days
weeks
M

months

Y

years

S

scores

Caveats

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

Releases

Unchanged in 135 releases since Mac OS X 10.4.

  1. 10.4–26.5

From ksh 42 in macOS 26.5. Parsed by carta from the page's man source.