Open llecigne opened 7 years ago
Sometimes Timing struct cannot be used because duration to record is known using a starting date coming from another context (DB or whatever).
Timing
When using Client.Timing method, caller has to manually redo the int64 casting/millisecond truncating by hand because time.Duration is not supported.
Client.Timing
ex:
startDate := ... // some time.Time coming from another context client.Timing(int64(time.Now().Sub(startDate)/time.Millisecond))
a simpler alternative would be
client.Timing(time.Now().Sub(startDate))
Sometimes
Timing
struct cannot be used because duration to record is known using a starting date coming from another context (DB or whatever).When using
Client.Timing
method, caller has to manually redo the int64 casting/millisecond truncating by hand because time.Duration is not supported.ex:
a simpler alternative would be