Use duration propertly in Wait

Relying on the fact that time.Duration is an int64 is weird.