core.get_microtime.php 360 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Smarty plugin
  4. * @package Smarty
  5. * @subpackage plugins
  6. */
  7. /**
  8. * Get seconds and microseconds
  9. * @return double
  10. */
  11. function smarty_core_get_microtime($params, &$smarty)
  12. {
  13. $mtime = microtime();
  14. $mtime = explode(" ", $mtime);
  15. $mtime = (double)($mtime[1]) + (double)($mtime[0]);
  16. return ($mtime);
  17. }
  18. /* vim: set expandtab: */
  19. ?>