diff options
| author | christos <christos@NetBSD.org> | 2015-09-30 22:01:06 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2015-09-30 22:01:06 +0000 |
| commit | e137d3e0cc26fa9bd0abf9c93f273405d3262454 (patch) | |
| tree | 4ee836ef475344e4753a6ed6556d65a847f12a1e /external/cddl/dtracetoolkit/dist/Code/JavaScript/func_clock.html | |
| parent | fb62d9db1152e5cb288c8d7b66f2d506bc3b5d10 (diff) | |
Import the dtrace toolkit from FreeBSD; simple scripts such as dtruss work
unmodified. For others we'll need to add the missing probes and adjust.
This is not attached to the build.
Diffstat (limited to 'external/cddl/dtracetoolkit/dist/Code/JavaScript/func_clock.html')
| -rw-r--r-- | external/cddl/dtracetoolkit/dist/Code/JavaScript/func_clock.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/external/cddl/dtracetoolkit/dist/Code/JavaScript/func_clock.html b/external/cddl/dtracetoolkit/dist/Code/JavaScript/func_clock.html new file mode 100644 index 00000000000..c25610b30f2 --- /dev/null +++ b/external/cddl/dtracetoolkit/dist/Code/JavaScript/func_clock.html @@ -0,0 +1,39 @@ +<HTML> +<HEAD> +<TITLE>func_clock, JavaScript</TITLE> +<SCRIPT type="text/javascript"> +function func_c() { + document.getElementById('now').innerHTML += "Function C<br>" + for (i = 0; i < 30000; i++) { + j = i + 1 + } +} + +function func_b() { + document.getElementById('now').innerHTML += "Function B<br>" + for (i = 0; i < 20000; i++) { + j = i + 1 + } + func_c() +} + +function func_a() { + document.getElementById('now').innerHTML += "Function A<br>" + for (i = 0; i < 10000; i++) { + j = i + 1 + } + func_b() +} + +function start() { + now = new Date() + document.getElementById('now').innerHTML = now + "<br>" + func_a() + var timeout = setTimeout('start()', 1000) +} +</SCRIPT> +</HEAD> +<BODY onload="start()"> +<DIV id="now"></DIV> +</BODY> +</HTML> |
