Jump to content

How to get time diff in ms? time(); only gets me secs but not milliseconds


rain13

Recommended Posts

$timeinit = time();sleep(1.3);die("Time Diff: ".(time() - $timeinit) );

This outputs me 1 but I would like it to output me 1300. I want to write timer that would tell me how low long did it take to process some func. Like I init timer before calling func and then have die("Time Diff: ".(time() - $timeinit) ); after func call so I could find out time in ms that func worked.any ideas how to do this?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...