TimerInfotron
Everytime a message comes into "trigger", the timer is reset
input terminals: trigger - <type: any>
output_terminals: time_out - <type: any>
properties: timeout - <type: number> timeout_value - <type: any> auto_start - <type: boolean>
Demos that use it
- timer.html
BLUEPRINT(
"~01F5F5C7589CB94811A660996941406A57",
[
["%startup", "onStartUp", 1],
["trigger_in", "onTrigger", 1]
],
[
"timeout_value_out"
],
function()
{
var Blueprint = function(id, props, bp_uuid)
{
this.__init__(id, bp_uuid);
this._id = undefined;
this._timeout = props["timeout"] || 1000;
this._timeout_val = props["timeout_value"];
this._autostart = (props["auto_start"] == false) ? false : true;
};
Blueprint.prototype = new Infotron;
Blueprint.prototype.onStartUp = function(msg)
{
if (this._autostart) {
this.onTrigger(msg);
}
}
Blueprint.prototype.onTrigger = function(msg)
{
var val;
var self = this;
var func = function()
{
if (self._timeout_val === undefined) {
val = new Date();
} else {
val = self._timeout_val;
}
self.postMessage("timeout_value_out", val);
};
if (this._id != undefined) {
__w.clearTimeout(this._id);
}
this._id = __w.setTimeout(func, this._timeout);
};
return Blueprint;
}, "Wait, then Send Message");
Wiki Pages
- AboutEform
- AdvancedExamples
- AlertInfotron
- AtomicConstructor
- BulletList
- ButtonInfotron
- ConstructorInfotron
- ContactTheMaintainers
- Dataflow Design Patterns
- DataflowDesignPatterns
- Demo43
- DemoButton
- DemoClock
- DemoEvDb
- DemoForm
- demoHierarchicalEncapsulation
- demoHttp
- DemoMap
- DemoMultiMap
- demoPhotobucketAndWebshot
- demoRssFeeds
- demoRssFeedsTimeline
- DemoSlideShow
- DemoStickyNote
- DemosWalkThrough
- demoYahooSearch
- EformMapperInfotron
- EformRouterInfotron
- EformWrapperInfotron
- EvolutionOfJDA
- FeedMagickInfotron
- FormInfotron
- FourPortRouterInfotron
- GettingStarted
- HowJdaWorks
- HtmlBlueprintSpec
- HtmlInfotron
- HtmlPagerInfotron
- HttpProxyInfotron
- IDA
- ImageInfotron
- InfotronDoc
- JDA Propaganda
- JdaCapabilities
- JdaIncapabilities
- JdaQuotes
- JdaResources
- JdaUsage
- JohnResigJsonRssToCollection
- JsBlueprintSpec
- JsonCallbackInfotron
- JsonXmlFilter
- JsStarDoc
- ListRouterInfotron
- OptionSelectorInfotron
- PasteboardInfotron
- PatternsForLoadingDependencies
- ScratchPad
- SendMessageInfotron
- SendMessagesInfotron
- SequenceMatcherInfotron
- SimpleGoogleMapInfotron
- SimpleYahooMapInfotron
- SlideShowInfotron
- SnifferInfotron
- StaticCalendarInfotron
- StickNotesInfotron
- TabularListingInfotron
- TextInfotron
- TextScrapListerInfotron
- TimeLineInfotron
- TimerInfotron
- Troubleshoot
- TwoStringJoinerInfotron
- UnofficialBlueprints
- UpcoingOrgInfotron
- XmlToEformInfotron
- YahooJsonInfotron
Space Home