Esempio n. 1
0
 /// <summary>
 /// Increments the value of the counter 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 ICounter counter, DateTimeOffset timestamp)
 {
     counter.IncTo(TimestampHelpers.ToUnixTimeSecondsAsDouble(timestamp));
 }
Esempio n. 2
0
 /// <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(TimestampHelpers.ToUnixTimeSecondsAsDouble(timestamp));
 }
Esempio n. 3
0
 /// <summary>
 /// Increments the value of the counter 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 ICounter counter)
 {
     counter.IncTo(TimestampHelpers.ToUnixTimeSecondsAsDouble(DateTimeOffset.UtcNow));
 }
Esempio n. 4
0
 /// <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(TimestampHelpers.ToUnixTimeSecondsAsDouble(DateTimeOffset.UtcNow));
 }