Редакция 2 | Только различия | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 2 | Редакция 48 | ||
---|---|---|---|
1 | <?php
|
1 | <?php
|
2 | /**
|
2 | /**
|
3 | * Smarty plugin
|
3 | * Smarty plugin
|
4 | * @package Smarty
|
4 | * @package Smarty
|
5 | * @subpackage plugins
|
5 | * @subpackage plugins
|
6 | */
|
6 | */
|
7 | 7 | ||
8 | /**
|
8 | /**
|
9 | * Get seconds and microseconds
|
9 | * Get seconds and microseconds
|
10 | * @return double
|
10 | * @return double
|
11 | */
|
11 | */
|
12 | function smarty_core_get_microtime($params, &$smarty) |
12 | function smarty_core_get_microtime($params, &$smarty) |
13 | {
|
13 | {
|
14 | $mtime = microtime(); |
14 | $mtime = microtime(); |
15 | $mtime = explode(" ", $mtime); |
15 | $mtime = explode(" ", $mtime); |
16 | $mtime = (double)($mtime[1]) + (double)($mtime[0]); |
16 | $mtime = (double)($mtime[1]) + (double)($mtime[0]); |
17 | return ($mtime); |
17 | return ($mtime); |
18 | }
|
18 | }
|
19 | 19 | ||
20 | 20 | ||
21 | /* vim: set expandtab: */
|
21 | /* vim: set expandtab: */
|
22 | 22 | ||
23 | ?>
|
23 | ?>
|
24 | 24 |