Assembly: PostSharp.Patterns.Diagnostics.Configuration (in PostSharp.Patterns.Diagnostics.Configuration.dll) Version: 188.8.131.52 (184.108.40.206)
public static bool OnceEveryXSeconds( double seconds, string key )
- Type: System.Double
An amount of time in seconds.
- Type: System.String
An arbitrary key. Required but can be empty.
Return ValueType: Boolean
Note that the side effect of calling this method, in case it returns true, is to set a timestamp for the specified key so that the next call to the method with the same value of key will return false unless it is called later than after the given time span. This is a side effect of calling this method and is not dependent of the actual result of the sampling expression. That is, the side effect will occur even in a combined expression like OnceEveryXSeconds( 1, "foo") && false.
This function is only available in the Sample expression.