chromium/native_client_sdk/src/examples/api/core/index.html

<!DOCTYPE html>
<html>
  <!--
  Copyright 2013 The Chromium Authors
  Use of this source code is governed by a BSD-style license that can be
  found in the LICENSE file.
  -->
<head>
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Expires" content="-1">
  <title>{{title}}</title>
  <script type="text/javascript" src="common.js"></script>
  <script type ="text/javascript" src="example.js"></script>
</head>
<body {{attrs}}>
  <h1>{{title}}</h1>
  <h2>Status: <code id="statusField">NO-STATUS</code></h2>
  <p>The Core API example demonstrates the basic use of the Time and Callback
     functions.</p>
  <p> Push 'Start Test' to run <span id="count">0</span> iterations.  Each
     iteration will send a message to the NaCl module containing the number of
     milliseconds to delay. The modules will immediately post a message back
     if the delay is zero, otherwise, it will issue a CallOnMainThread with
     the delay specified.</p>
  <p> Once the test completes, it will calculate the average time spent
      between the message reception and the callback triggering (NaCl Delay),
      the average time for a single round trip (Round Trip), and the
      average iteration including other JS overhead (Total). </p>
  <div>
   NaCl Delay
   <input type="number" id="delay" value="0" min="0" max="20"
       style="text-align:right"> ms
   <input type="button" id="start" value="Start Test">
   <table style="border:1px solid black">
    <tr>
      <th>NaCl Delay</th><th>Round Trip</th><th>Total</th>
    </tr>
    <tr>
      <td id="NaCl">Unknown</td>
      <td id="Round">Unknown</td>
      <td id="Total">Unknown</td>
    </tr>
   </table>
  </div>
  <div id="listener"></div>
</body>
</html>