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

io.prometheus.metrics.expositionformats.ProtobufUtil Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package io.prometheus.metrics.expositionformats;

import io.prometheus.metrics.shaded.com_google_protobuf_3_25_3.Timestamp;

public class ProtobufUtil {

    static Timestamp timestampFromMillis(long timestampMillis) {
        return Timestamp.newBuilder()
                .setSeconds(timestampMillis / 1000L)
                .setNanos((int) (timestampMillis % 1000L * 1000000L))
                .build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy