×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Fabio Rongione
Added: May 10, 2021 9:21 AM
Views: 4007
Tags: no tags
  1. /* EN DEBUT DE FICHIER */
  2. function getmicrotime()
  3. {  
  4.       list($usec, $sec) = explode(" ",microtime());  
  5.       return ((float)$usec + (float)$sec);  
  6. }
  7.  
  8. /* AVANT REQUETE */
  9. $time_start = getmicrotime();
  10.  
  11. /* REQUETE */
  12.  
  13. /* APRES REQUETE */
  14. $time_end = getmicrotime();
  15. $time = $time_end - $time_start;
  16. echo "Requete exécutée en $time secondes";