1710632d07b13609444626367bebd34c0af3acb6aMikhail Glushenkov<!DOCTYPE html> 26091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer<html> 36091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer <!-- 46091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer Copyright (c) 2013 The Chromium Authors. All rights reserved. 57ed47a13356daed2a34cd2209a31f92552e3bdd8Chris Lattner Use of this source code is governed by a BSD-style license that can be 67ed47a13356daed2a34cd2209a31f92552e3bdd8Chris Lattner found in the LICENSE file. 76091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer --> 86091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer<head> 927107f6ab4627fa38bcacad6757ed6d52910f880Bill Wendling <meta http-equiv="Pragma" content="no-cache"> 1027107f6ab4627fa38bcacad6757ed6d52910f880Bill Wendling <meta http-equiv="Expires" content="-1"> 1127107f6ab4627fa38bcacad6757ed6d52910f880Bill Wendling <title>{{title}}</title> 1227107f6ab4627fa38bcacad6757ed6d52910f880Bill Wendling <script type="text/javascript" src="common.js"></script> 1327107f6ab4627fa38bcacad6757ed6d52910f880Bill Wendling <script type ="text/javascript" src="example.js"></script> 146091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer</head> 156091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer<body {{attrs}}> 16674be02d525d4e24bc6943ed9274958c580bcfbcJakub Staszak <h1>{{title}}</h1> 17674be02d525d4e24bc6943ed9274958c580bcfbcJakub Staszak <h2>Status: <code id="statusField">NO-STATUS</code></h2> 186091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer <p>The Core API example demonstrates the basic use of the Time and Callback 19d509d0b532ec2358b3f341d4a4cd1411cb8b5db2Chris Lattner functions.</p> 203467e30edf63b6d8a8d446186674ba9e4b7885a9Bill Wendling <p> Push 'Start Test' to run <span id="count">0</span> iterations. Each 21c835b8c30127d15599de2d614434d39a6cc3ae17Benjamin Kramer iteration will send a message to the NaCl module containing the number of 223f213e7b3a6829a154d4e8ceb7d8689b389bd5dcBenjamin Kramer milliseconds to delay. The modules will immediately post a message back 2322bd64173981bf1251c4b3bfc684207340534ba3Bill Wendling if the delay is zero, otherwise, it will issue a CallOnMainThread with 24ea59f896a672c2e1ef9f02277bce60257aa60989Bill Wendling the delay specified.</p> 2558d74910c6b82e622ecbb57d6644d48fec5a5c0fChris Lattner <p> Once the test completes, it will calculate the average time spent 266091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer between the message reception and the callback triggering (NaCl Delay), 276091ebd172a16a10f1ea66061a5fa7cbf5139e56Reid Spencer the average time for a single round trip (Round Trip), and the 28d426a642a23a234547cbc7061f5bfec157673249Bill Wendling average iteration including other JS overhead (Total). </p> 29702cc91aa1bd41540e8674921ae7ac89a4ff061fBill Wendling <div> 30f6670729aabc1fab85238d2b306a1c1767a807bbBill Wendling NaCl Delay 31817abdd8b055059e5930a15704b9f52da4236456Bill Wendling <input type="number" id="delay" value="0" min="0" max="20" 32817abdd8b055059e5930a15704b9f52da4236456Bill Wendling style="text-align:right"> ms 336dc3781d44e56f0addf28b06232a50f3f9e6b1afBill Wendling <input type="button" id="start" value="Start Test"> 34c835b8c30127d15599de2d614434d39a6cc3ae17Benjamin Kramer <table style="border:1px solid black"> 352c79ecbd704c656178ffa43d5a58ebe3ca188b40Bill Wendling <tr> 36ad9a9e15595bc9d5ba1ed752caf8572957f77a3dDuncan Sands <th>NaCl Delay</th><th>Round Trip</th><th>Total</th> 37ad9a9e15595bc9d5ba1ed752caf8572957f77a3dDuncan Sands </tr> 381d3dcfe4246b4d45fa78a8dfd0a11c7fff842c15Bill Wendling <tr> 3927107f6ab4627fa38bcacad6757ed6d52910f880Bill Wendling <td id="NaCl">Unknown</td> 4027107f6ab4627fa38bcacad6757ed6d52910f880Bill Wendling <td id="Round">Unknown</td> 411d3dcfe4246b4d45fa78a8dfd0a11c7fff842c15Bill Wendling <td id="Total">Unknown</td> 421d3dcfe4246b4d45fa78a8dfd0a11c7fff842c15Bill Wendling </tr> 431d3dcfe4246b4d45fa78a8dfd0a11c7fff842c15Bill Wendling </table> 44034b94b17006f51722886b0f2283fb6fb19aca1fBill Wendling </div> 456765834754cbb3cb0f15b4b15e98c5e73fa50066Bill Wendling <div id="listener"></div> 461d3dcfe4246b4d45fa78a8dfd0a11c7fff842c15Bill Wendling</body> 4773dee180c836270644dfa7d90f9c5ba877567999Bill Wendling</html> 48f3d1500ab2c7364d3d0fb73a7e1b8c6339ab48b1Bill Wendling