def timestamp(with_ms=False, time=None):
        if time is None:
            time = datetime.datetime.now()

        if with_ms:
            return time.strftime('%Y%m%d_%H%M%S.%f')[:-3]
        else:
            return time.strftime('%Y%m%d_%H%M%S')