summaryrefslogtreecommitdiffstats
path: root/doc/tutorial/tapset
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-02-27 21:32:43 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-02-27 21:32:43 -0500
commit23220a9c611cd088418d108b3fa6d35aad177175 (patch)
treee7e459d81a344d958ff7739215f24e17db3324f1 /doc/tutorial/tapset
parented1f47c32969a60eb074dc246c79ccda456ebf58 (diff)
parent872a4b73dc80fd865d61f17911b84494e1f820d9 (diff)
downloadsystemtap-steved-23220a9c611cd088418d108b3fa6d35aad177175.tar.gz
systemtap-steved-23220a9c611cd088418d108b3fa6d35aad177175.tar.xz
systemtap-steved-23220a9c611cd088418d108b3fa6d35aad177175.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'doc/tutorial/tapset')
-rw-r--r--doc/tutorial/tapset/time-common.stp4
-rw-r--r--doc/tutorial/tapset/time-default.stp2
2 files changed, 6 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] }
+
diff --git a/doc/tutorial/tapset/time-default.stp b/doc/tutorial/tapset/time-default.stp
new file mode 100644
index 00000000..614ff506
--- /dev/null
+++ b/doc/tutorial/tapset/time-default.stp
@@ -0,0 +1,2 @@
+function __time_value () { return gettimeofday_us () }
+