File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 11import { WASI } from '@wasmer/wasi/lib' ;
22import WASIBindings from '@wasmer/wasi/lib/bindings/node' ;
33import { WasmFs } from '@wasmer/wasmfs' ;
4+ import Big from 'big.js' ;
45import { alea } from 'seedrandom' ;
56import { VmContext } from "../models/Context" ;
67import { ExecuteResult } from '../models/ExecuteResult' ;
@@ -21,7 +22,7 @@ export function executeWasm(context: VmContext): Promise<ExecuteResult> {
2122 bindings : {
2223 ...WASIBindings ,
2324 fs : virtualFs . getFs ( ) ,
24- hrtime : ( ) => BigInt ( context . timestamp ) ,
25+ hrtime : ( ) => BigInt ( new Big ( context . timestamp ) . mul ( 1_000_000 ) . toString ( ) ) ,
2526 randomFillSync : ( buffer : any , offset , size ) => {
2627 const randomBuffer = generateFixedBuffer ( random . int32 ( ) . toString ( ) , size ?? buffer . length - offset ) ;
2728 buffer . set ( randomBuffer , offset ) ;
You can’t perform that action at this time.
0 commit comments