Fixing time duration bug (10 nanosecond default) and using time.After instead of separate goroutine