/// <summary> /// Increments the value of the gauge to a specific moment as the UTC Unix timestamp in seconds. /// Value does not include any elapsed leap seconds because Unix timestamps do not include leap seconds. /// Operation is ignored if the current value is already greater. /// </summary> public static void IncToTimeUtc(this IGauge gauge, DateTimeOffset timestamp) { gauge.IncTo(ToUnixTimeSecondsAsDouble(timestamp)); }
public static void IncTo(this IGauge <long> gauge, long value, DateTimeOffset timestamp) { gauge.IncTo(value, timestamp.ToUnixTimeMilliseconds()); }
/// <summary> /// Increments the value of the gauge to the current UTC time as a Unix timestamp in seconds. /// Value does not include any elapsed leap seconds because Unix timestamps do not include leap seconds. /// Operation is ignored if the current value is already greater. /// </summary> public static void IncToCurrentTimeUtc(this IGauge gauge) { gauge.IncTo(ToUnixTimeSecondsAsDouble(DateTimeOffset.UtcNow)); }