DRY timeGap method

*delete duplicate method part
*extract logic to individual method