Browse Source

* Fix getting clock time

Michaël Van Canneyt 3 years ago
parent
commit
705e4c08f5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/wasi/wasienv.pas

+ 2 - 1
packages/wasi/wasienv.pas

@@ -769,7 +769,7 @@ Var
 
 
 begin
 begin
   lowWord:=value;
   lowWord:=value;
-  highWord:=0;
+  highWord:=value shr 32;
   if LittleEndian then
   if LittleEndian then
     begin
     begin
     view.setUint32(ByteOffset+0, lowWord, littleEndian);
     view.setUint32(ByteOffset+0, lowWord, littleEndian);
@@ -801,6 +801,7 @@ begin
   WASI_CLOCK_THREAD_CPUTIME_ID:
   WASI_CLOCK_THREAD_CPUTIME_ID:
     Result:=TJSDate.Now;
     Result:=TJSDate.Now;
   end;
   end;
+  Result:=Result*1000000
 end;
 end;