Examples of UptimeObject


Examples of systeminformationmonitor.system.object.UptimeObject

    public void prepare() {
    }

    @Override
    public void update() {
        final UptimeObject uptimeObj =  getUptime();

        threadLock.lock();
        try {
            SwingUtilities.invokeAndWait(new Runnable() {
                @Override
                public void run() {
                    sysApp.getView().setUpTimeTextField(uptimeObj.getUptime());
                }
            });
        } catch (InterruptedException ex) {
            Logger.getLogger(Uptime.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InvocationTargetException ex) {
View Full Code Here

Examples of systeminformationmonitor.system.object.UptimeObject

            threadLock.unlock();
        }
    }

    private UptimeObject getUptime() {
        UptimeObject uptimeObj = new UptimeObject();
        uptimeObj.setUptime(mx.getUptime());
        return uptimeObj;
    }
View Full Code Here

Examples of systeminformationmonitor.system.object.UptimeObject

     * @deprecated Sigar's API is not functioning correctly for uptime,
     * use getUptime() instead.
     */
    @Deprecated
    private UptimeObject getSigarSystemUptime(){
        UptimeObject uptimeObj = new UptimeObject();
        try {
            // Sigar uptime is broken
            uptimeObj.setUptime(sigar.getUptime().getUptime());
        } catch (SigarException e) {
            System.err.println("Exception getting uptime: " + e.getMessage());
        }
        return uptimeObj;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.