1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00

Add no-ops for very old browsers without the performance API

This commit is contained in:
Frank Denis 2017-10-05 01:46:02 +02:00
parent 37d9f09f5b
commit e784a3fb40

View File

@ -28,6 +28,15 @@ body {
<h1></h1> <h1></h1>
<section class="test" id="test-res"></section> <section class="test" id="test-res"></section>
<script> <script>
var performance;
if (typeof performance !== 'object') {
performance = {
mark: function() { },
measure: function() { },
getEntriesByName: function() { return [ -1 ] }
};
}
var Module = { preRun: function() { performance.mark('bench_start') } }; var Module = { preRun: function() { performance.mark('bench_start') } };
function runTest(tname) { function runTest(tname) {