import math
import time


def show_progress(since, percent):
    """Prints time elapsed and estimated time remaining given the current time and progress in %"""

    def convert_to_minutes(s):
        """Converts seconds to minutes and seconds"""
        m = math.floor(s / 60)
        s -= m * 60
        return '%dm %ds' % (m, s)

    now = time.time()
    s = now - since
    es = s / percent
    rs = es - s
    return 'Time elapsed [%s], remaining [%s]' % \
           (convert_to_minutes(s), convert_to_minutes(rs))