diff options
author | fche <fche> | 2005-09-02 15:54:18 +0000 |
---|---|---|
committer | fche <fche> | 2005-09-02 15:54:18 +0000 |
commit | a5a5398e240d39cedb7d944edb833d8449da3e11 (patch) | |
tree | f5f615fafadc093c70a6823da2852a698061ef1d /tapset/timestamp.stp | |
parent | 86333c5231e7f07ae56443a72155a59aa8dd1ddb (diff) | |
download | systemtap-steved-a5a5398e240d39cedb7d944edb833d8449da3e11.tar.gz systemtap-steved-a5a5398e240d39cedb7d944edb833d8449da3e11.tar.xz systemtap-steved-a5a5398e240d39cedb7d944edb833d8449da3e11.zip |
2005-09-02 Frank Ch. Eigler <fche@elastic.org>
* tapset/*.stp: Renamed several files to simplify names.
Diffstat (limited to 'tapset/timestamp.stp')
-rw-r--r-- | tapset/timestamp.stp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tapset/timestamp.stp b/tapset/timestamp.stp new file mode 100644 index 00000000..f8e1ea4e --- /dev/null +++ b/tapset/timestamp.stp @@ -0,0 +1,19 @@ +%{ +#include <linux/time.h> +%} + +// return in milliseconds since epoch +function gettimeofday_ms () %{ + struct timeval tm; + do_gettimeofday (& tm); + THIS->__retvalue = (tm.tv_sec * 1000) + (tm.tv_usec / 1000); +%} + +// return in seconds since epoch +function gettimeofday_s () %{ + struct timeval tm; + do_gettimeofday (& tm); + THIS->__retvalue = tm.tv_sec; +%} + +// likewise jiffies, monotonic_clock ... |