adds a rerender example

This commit is contained in:
Will Charczuk 2018-10-11 17:18:46 -07:00
parent 828d1952d8
commit 0fb4aa53e9
2 changed files with 55 additions and 0 deletions

View file

@ -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())