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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
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: Wed Apr 24 12:01:29 2024 UTC