how long does mining take