php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
hrtime.c File Reference
#include "php.h"
#include "zend_hrtime.h"

Go to the source code of this file.

Macros

#define HRTIME_U64A(i, s, len)
 
#define PHP_RETURN_HRTIME(t)
 

Functions

 PHP_FUNCTION (hrtime)
 

Macro Definition Documentation

◆ HRTIME_U64A

#define HRTIME_U64A ( i,
s,
len )
Value:
do { \
int st = snprintf(s, len, "%llu", i); \
s[st] = '\0'; \
} while (0)
size_t len
Definition apprentice.c:174
char s[4]
Definition cdf.c:77
#define snprintf

Definition at line 27 of file hrtime.c.

◆ PHP_RETURN_HRTIME

#define PHP_RETURN_HRTIME ( t)
Value:
do { \
char _a[ZEND_LTOA_BUF_LEN]; \
double _d; \
HRTIME_U64A(t, _a, ZEND_LTOA_BUF_LEN); \
_d = zend_strtod(_a, NULL); \
RETURN_DOUBLE(_d); \
} while (0)
#define NULL
Definition gdcache.h:45
#define ZEND_LTOA_BUF_LEN
Definition zend_long.h:55
ZEND_API double zend_strtod(const char *s00, const char **se)

Definition at line 33 of file hrtime.c.

Function Documentation

◆ PHP_FUNCTION()

PHP_FUNCTION ( hrtime )

Definition at line 47 of file hrtime.c.