All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pro.panopticon.client.sensor.impl.UptimeSensor Maven / Gradle / Ivy

package pro.panopticon.client.sensor.impl;

import pro.panopticon.client.model.Measurement;
import pro.panopticon.client.sensor.Sensor;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class UptimeSensor implements Sensor {

    private static final LocalDateTime STARTED = LocalDateTime.now();

    @Override
    public List measure() {
        List measurements = new ArrayList<>();

        measurements.add(new Measurement("uptime.since", "INFO", STARTED.toString()));

        return measurements;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy