[fpc-pascal] question about FpTimes in BaseUnix package

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Nov 17 19:38:09 CET 2009


On 17 Nov 2009, at 19:34, Bruce Bauman wrote:

> I am using the FpTimes function from the BaseUnix package. The
> documentation says it returns -1 on an error, otherwise the number of
> clock ticks since boot time. However, the return type of this function
> is TClock, which is unsigned.

From "man 3 times":

If an
error occurs, times() returns the value ((clock_t)-1), and sets errno to
indicate the error.

So check against TClock(-1).


Jonas


More information about the fpc-pascal mailing list