php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #49134 posix_times() does not specify units
Submitted: 2009-08-02 06:54 UTC Modified: 2011-01-01 16:11 UTC
From: spoon dot reloaded at gmail dot com Assigned:
Status: Open Package: POSIX related
PHP Version: * OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-08-02 06:54 UTC] spoon dot reloaded at gmail dot com
Description:
------------
The posix_times() function returns an array with keys like "utime - user time used by the current process" and "stime - system time used by the current process". But the documentation does not say what units (seconds? microseconds? deciseconds?) are used for the "user time" or "system time". This makes the function completely useless, because one has no idea what the results mean.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-05 13:20 UTC] dave@php.net
The times used in posix_times() are in "clock ticks", however there is currently no way to determine the number of "clock ticks per second" in PHP as it varies per system, so it doesn't translate back into a meaningful number.

Reclassifying this as a POSIX-related issue.

Can we get the output of sysconf(_SC_CLK_TCK) added as an array element in posix_times()? This would make this function useful.
 [2011-01-01 16:11 UTC] jani@php.net
-Package: Feature/Change Request +Package: POSIX related -Operating System: +Operating System: * -PHP Version: 6 +PHP Version: *
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 05:01:24 2019 UTC