import time


def logDiskUsage(job, funcName, sleep=0):
    """
    Logs the job's disk usage to master and sleeps for specified amount of time.

    :return: job function's disk usage
    """
    diskUsage = job.disk
    job.fileStore.logToMaster('{}: {}'.format(funcName, diskUsage))
    time.sleep(sleep)
    return diskUsage