How can a process inquire, when it was started?
问题 Is there a call, that can be used to ask the OS, when the current process started? Of course, one could simply call gettimeofday() at start-up and refer to that once-recorded value through the life of the process, but is there another option? Obviously, the OS keeps the record for each process (one can see it in the output of ps , for example). Can it be queried by the process itself (using C)? An ideal solution would, of course, be cross-platform, but something (Free)BSD-specific is fine too