コード例 #1
0
def maybe_timestamp(base, attr):
    if base is not None and getattr(base, attr):
        return human.format_timestamp_with_milli(getattr(base, attr))
    else:
        return "active"
コード例 #2
0
ファイル: flowdetailview.py プロジェクト: AlTune/mitmproxy
def maybe_timestamp(base, attr):
    if base is not None and getattr(base, attr):
        return human.format_timestamp_with_milli(getattr(base, attr))
    else:
        return "active"
コード例 #3
0
ファイル: test_human.py プロジェクト: weloverandom/mitmproxy
def test_format_timestamp_with_milli():
    assert human.format_timestamp_with_milli(time.time())