fix build error caused by rust recent change: purely namespaced enums
fix a build error: num.abs
fix a build error caused by that the Zero trait is no longer implemented for Duration
fix failed test