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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
10 - 1 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 17:01:29 2024 UTC