workflowfm / proter

A discrete event simulator for asynchronous prioritized processes
http://docs.workflowfm.com/proter
Apache License 2.0
1 stars 0 forks source link

Avoid Long/Double conversions #54

Closed PetrosPapapa closed 2 years ago

PetrosPapapa commented 2 years ago

We should maintain separate Distributions for Long and Double values.

For example Task.withDuration should (only) accept a Long: https://github.com/workflowfm/proter/blob/4124ffac09a57ea828e2a915d37d21804baea9e4/proter/src/main/scala/com/workflowfm/proter/Task.scala#L274

Long to Double conversions may truncate and are deprecated in recent Scala versions (see compiler deprecation warnings).