mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 12:36:01 -07:00
Add no-ops for very old browsers without the performance API
This commit is contained in:
parent
37d9f09f5b
commit
e784a3fb40
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user