summaryrefslogtreecommitdiff
path: root/smartyplugins/function.elapsed.php
diff options
context:
space:
mode:
Diffstat (limited to 'smartyplugins/function.elapsed.php')
-rw-r--r--smartyplugins/function.elapsed.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/smartyplugins/function.elapsed.php b/smartyplugins/function.elapsed.php
new file mode 100644
index 0000000..69bb602
--- /dev/null
+++ b/smartyplugins/function.elapsed.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+/**
+ * smarty_function_elapsed
+ */
+function smarty_function_elapsed($params, &$gBitSmarty)
+{
+ global $gBitSystem;
+
+ $ela = number_format($gBitSystem->mTimer->elapsed(),2);
+ print($ela);
+}
+
+/* vim: set expandtab: */
+
+?>