package cn.reghao.devops.common.machine;

import cn.reghao.jutil.jdk.machine.data.MachineData;
import cn.reghao.jutil.jdk.machine.data.detail.OsDetail;
import cn.reghao.jutil.jdk.machine.data.stat.OsStat;
import oshi.software.os.OperatingSystem;

/**
 * @author reghao
 * @date 2020-10-20 23:17:30
 */
public class Os implements MachineData<OsDetail, OsStat> {
    private OperatingSystem os;

    public Os(OperatingSystem os) {
        this.os = os;
    }

    @Override
    public OsDetail detail() {
        OsDetail osDetail = new OsDetail();
        osDetail.setBootTime(os.getSystemBootTime());
        return osDetail;
    }

    @Override
    public OsStat stat() {
        return null;
    }
}
