adds a rerender example
This commit is contained in:
parent
828d1952d8
commit
0fb4aa53e9
2 changed files with 55 additions and 0 deletions
|
|
@ -9,6 +9,11 @@ var (
|
|||
|
||||
type timeUtil struct{}
|
||||
|
||||
// Millis returns the duration as milliseconds.
|
||||
func (tu timeUtil) Millis(d time.Duration) float64 {
|
||||
return float64(d) / float64(time.Millisecond)
|
||||
}
|
||||
|
||||
// TimeToFloat64 returns a float64 representation of a time.
|
||||
func (tu timeUtil) ToFloat64(t time.Time) float64 {
|
||||
return float64(t.UnixNano())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue