io.prometheus.metrics.expositionformats.ProtobufUtil Maven / Gradle / Ivy
package io.prometheus.metrics.expositionformats;
import io.prometheus.metrics.shaded.com_google_protobuf_3_21_7.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