Skip to content

Instantly share code, notes, and snippets.

@binarybucks
Created June 4, 2013 16:48
Show Gist options
  • Save binarybucks/5707512 to your computer and use it in GitHub Desktop.
Save binarybucks/5707512 to your computer and use it in GitHub Desktop.
define Timer {
tag : '',
date: undefined,
constructor : function(tag, date){
this.tag = tag;
this.date = date;
}
}
rule rulename {
when {
// for first firing // all following
t : !(Timer t.tag=='rulename') || (t.tag=='rulename' && t.date > 5 minutes)
// other conditions
}
then {
// do sth.
// update timer
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment