Search code examples
posixapi-design

Design rationale for time(2)


If tloc is non-NULL, the return value is also stored in the memory pointed to by tloc.

Question: Why would one like to store the value somewhere else than in the return value? Is this some kind of historical relic?


Solution

  • Apparently it is a relic:

    The tloc argument is obsolescent and should always be NULL in new code.

    But this raises the question why it was designed that way in the first place.