pyodide/emsdk/patches/fix_time.patch

21 lines
617 B
Diff

diff --git a/upstream/emscripten/src/library.js b/upstream/emscripten/src/library.js
index ea4cf27..6a692bd 100644
--- a/emsdk/upstream/emscripten/src/library.js
+++ b/emsdk/upstream/emscripten/src/library.js
@@ -772,6 +772,7 @@ LibraryManager.library = {
return ((Date.now() - _clock.start) * ({{{ cDefine('CLOCKS_PER_SEC') }}} / 1000))|0;
},
+ time__sig: 'ii',
time: function(ptr) {
var ret = (Date.now()/1000)|0;
if (ptr) {
@@ -780,6 +781,7 @@ LibraryManager.library = {
return ret;
},
+ difftime__sig: 'iii',
difftime: function(time1, time0) {
return time1 - time0;
},