Puoi usare la funzione microtime()