Ad Widget

Collapse

Can you see a need for a consecutive trigger function?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bignose
    Member
    • Dec 2008
    • 58

    #1

    Can you see a need for a consecutive trigger function?

    I was thinking this would be handy a function that works like this

    item.consecutive(#3)=FOO would evaluate to true if the last 3 values were all FOO

    likewise item.consecutive(30) would check all consecutive values in the last 30 seconds.

    This is sort of analgous but less verbose version of

    ( {item.last(#3)} = FOO ) &
    ( {item.last(#2)} = FOO ) &
    ( {item.last(#1)} = FOO )
  • bignose
    Member
    • Dec 2008
    • 58

    #2
    .count seems to do exactly as I want.

    Comment

    Working...