summaryrefslogtreecommitdiffstats
path: root/doc/tutorial/tapset/time-common.stp
diff options
context:
space:
mode:
authorfche <fche>2008-02-27 23:11:19 +0000
committerfche <fche>2008-02-27 23:11:19 +0000
commita20617af34e3dbeba682cfa6bf6366f3fc0f8e14 (patch)
treecd840323c6adb32af3f5fa8136a396a3a4f8562b /doc/tutorial/tapset/time-common.stp
parent9a5de18784b77de82e5121861fac892c2d4d2630 (diff)
downloadsystemtap-steved-a20617af34e3dbeba682cfa6bf6366f3fc0f8e14.tar.gz
systemtap-steved-a20617af34e3dbeba682cfa6bf6366f3fc0f8e14.tar.xz
systemtap-steved-a20617af34e3dbeba682cfa6bf6366f3fc0f8e14.zip
PR5697: include tutorial & language reference guide
Diffstat (limited to 'doc/tutorial/tapset/time-common.stp')
-rw-r--r--doc/tutorial/tapset/time-common.stp4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/tutorial/tapset/time-common.stp b/doc/tutorial/tapset/time-common.stp
new file mode 100644
index 00000000..cec5a4ea
--- /dev/null
+++ b/doc/tutorial/tapset/time-common.stp
@@ -0,0 +1,4 @@
+global __time_vars
+function timer_begin (name) { __time_vars[name] = __time_value () }
+function timer_end (name) { return __time_value() - __time_vars[name] }
+