Skip to content

Commit e9ec9fe

Browse files
Fix delay
1 parent 1111a47 commit e9ec9fe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,12 @@ impl PyVM {
402402
headers: vec![],
403403
},
404404
buffer.as_bytes().to_vec().into(),
405-
delay.map(Duration::from_millis),
405+
delay.map(|millis| {
406+
SystemTime::now()
407+
.duration_since(SystemTime::UNIX_EPOCH)
408+
.expect("Duration since unix epoch cannot fail")
409+
+ Duration::from_millis(millis)
410+
}),
406411
)
407412
.map(|_| ())
408413
.map_err(Into::into)

0 commit comments

Comments
 (0)