Example #1
0
 /// <summary>
 /// This will be passed to kairosdb as a relative milliseconds value
 /// </summary>
 /// <param name="end"></param>
 /// <returns></returns>
 public QueryBuilder SetEnd(TimeSpan end)
 {
     if (AbsoluteEnd.HasValue)
     {
         throw new ArgumentException("Both relative and absolute end times cannot be set.");
     }
     EndRelative = new RelativeTime((long)end.TotalMilliseconds, TimeUnit.Milliseconds);
     return(this);
 }
Example #2
0
 /// <summary>
 /// This will be passed to kairosdb as a relative time with the unit specified
 /// </summary>
 /// <param name="end"></param>
 /// <returns></returns>
 public QueryBuilder SetEnd(RelativeTime end)
 {
     if (AbsoluteEnd.HasValue)
     {
         throw new ArgumentException("Both relative and absolute end times cannot be set.");
     }
     EndRelative = end;
     return(this);
 }
Example #3
0
 /// <summary>
 /// This will be passed to kairosdb as a relative milliseconds value
 /// </summary>
 /// <param name="start"></param>
 /// <returns></returns>
 public QueryBuilder SetStart(TimeSpan start)
 {
     if (AbsoluteStart.HasValue)
     {
         throw new ArgumentException("Both relative and absolute start times cannot be set.");
     }
     StartRelative = new RelativeTime((long)start.TotalMilliseconds, TimeUnit.Milliseconds);
     return(this);
 }
Example #4
0
 /// <summary>
 /// This will be passed to kairosdb as a relative time with the unit specified
 /// </summary>
 /// <param name="start"></param>
 /// <returns></returns>
 public QueryBuilder SetStart(RelativeTime start)
 {
     if (AbsoluteStart.HasValue)
     {
         throw new ArgumentException("Both relative and absolute start times cannot be set.");
     }
     StartRelative = start;
     return(this);
 }