comment
This commit is contained in:
parent
f8f659e8ce
commit
bffc5bb8f1
@ -69,6 +69,7 @@ pub fn set_globals(lua:&mlua::Lua,globals:&mlua::Table)->Result<(),mlua::Error>{
|
|||||||
let delay=f.max(0.0)*60.0;
|
let delay=f.max(0.0)*60.0;
|
||||||
match delay.classify(){
|
match delay.classify(){
|
||||||
std::num::FpCategory::Nan=>Err(mlua::Error::runtime("NaN"))?,
|
std::num::FpCategory::Nan=>Err(mlua::Error::runtime("NaN"))?,
|
||||||
|
// cases where the number is too large to schedule
|
||||||
std::num::FpCategory::Infinite=>return Ok(()),
|
std::num::FpCategory::Infinite=>return Ok(()),
|
||||||
std::num::FpCategory::Normal=>if (u64::MAX as f64)<delay{
|
std::num::FpCategory::Normal=>if (u64::MAX as f64)<delay{
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
Loading…
Reference in New Issue
Block a user