def _get_about():
    current_time = int(time.time())
    about = {
        "uptime" : automium.delta_string(current_time - start_time),
        "system" : automium.resolve_os()
    }
    return about
示例#2
0
 def _build(cls, model, map):
     base.Base._build(model, map)
     result = model.get("result", False)
     delta = model.get("delta", 0)
     start_time = model.get("start_time", 0.0)
     end_time = model.get("end_time", 0.0)
     stat_time_d = datetime.datetime.fromtimestamp(start_time)
     end_time_d = datetime.datetime.fromtimestamp(end_time)
     model["result_l"] = result and "passed" or "failed"
     model["delta_l"] = automium.delta_string(delta)
     model["start_time_l"] = stat_time_d.strftime("%b %d, %Y %H:%M:%S")
     model["end_time_l"] = end_time_d.strftime("%b %d, %Y %H:%M:%S")
示例#3
0
 def _build(cls, model, map):
     base.Base._build(model, map)
     result = model.get("result", False)
     delta = model.get("delta", 0)
     start_time = model.get("start_time", 0.0)
     end_time = model.get("end_time", 0.0)
     stat_time_d = datetime.datetime.fromtimestamp(start_time)
     end_time_d = datetime.datetime.fromtimestamp(end_time)
     model["result_l"] = result and "passed" or "failed"
     model["delta_l"] = automium.delta_string(delta)
     model["start_time_l"] = stat_time_d.strftime("%b %d, %Y %H:%M:%S")
     model["end_time_l"] = end_time_d.strftime("%b %d, %Y %H:%M:%S")
示例#4
0
文件: base.py 项目: dchllngr/mantium
def _get_about():
    current_time = int(time.time())
    return dict(
        uptime = automium.delta_string(current_time - start_time),
        system = automium.resolve_os()
    )
示例#5
0
def _get_about():
    current_time = int(time.time())
    return dict(
        uptime = automium.delta_string(current_time - start_time),
        system = automium.resolve_os()
    )