|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: spoon dot reloaded at gmail dot com
New email:
PHP Version: OS:


 [2009-08-02 06:54 UTC] spoon dot reloaded at gmail dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-05 13:20 UTC]
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]
-Package: Feature/Change Request +Package: POSIX related -Operating System: +Operating System: * -PHP Version: 6 +PHP Version: *
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 19:01:29 2024 UTC