Update dependencies
This commit is contained in:
1 parent
033ac0b400
commit
5cdfab398d
3596 files changed
+1033483
-259
No files matched your search
+13
@@ -0,0 +1,13 @@
|
||||
package timeconv
|
||||
|
||||
import "time"
|
||||
|
||||
// FloatSecondsDur converts a fractional seconds to duration.
|
||||
func FloatSecondsDur(v float64) time.Duration {
|
||||
return time.Duration(v * float64(time.Second))
|
||||
}
|
||||
|
||||
// DurSecondsFloat converts a duration into fractional seconds.
|
||||
func DurSecondsFloat(d time.Duration) float64 {
|
||||
return float64(d) / float64(time.Second)
|
||||
}
|
||||
Reference in new issue
Block a user