Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.
/ arez-ticker Public archive

Arez component that ticks at a specified interval

License

Notifications You must be signed in to change notification settings

arez/arez-ticker

Repository files navigation

Deprecated

This project has been deprecated. In modern version of Arezs it is trivial to reimplement and with upcoming projects such as Spritz, it is no longer consider a recommended pattern.


Arez-IntervalTicker

Build Status

This library provides an Observable model that "ticks" at a specified interval. The tick is actually updating the "tickTime" observable property. The ticks are only generated when there is an observer of the property so there should be no significant performance impact if there is no observers.

Quick Start

The simplest way to use component;

  • add the following dependencies into the build system. i.e.
<dependency>
   <groupId>org.realityforge.arez.ticker</groupId>
   <artifactId>arez-ticker</artifactId>
   <version>0.57</version>
</dependency>
  • add the snippet <inherits name="arez.ticker.IntervalTicker"/> into the .gwt.xml file.

  • Use the IntervalTicker component. eg.

import arez.Arez;
import arez.ticker.IntervalTicker;
import com.google.gwt.core.client.EntryPoint;
import elemental2.dom.DomGlobal;

public class IntervalTickerExample
  implements EntryPoint
{
  @Override
  public void onModuleLoad()
  {
    final IntervalTicker ticker = IntervalTicker.create( 1000 );
    Arez.context().autorun( () -> DomGlobal.console.log( "Tick: " + ticker.getTickTime() ) );
  }
}

More Information

For more information about component, please see the Website. For the source code and project support please visit the GitHub project.

Contributing

The component was released as open source so others could benefit from the project. We are thankful for any contributions from the community. A Code of Conduct has been put in place and a Contributing document is under development.

License

The component is licensed under Apache License, Version 2.0.

About

Arez component that ticks at a specified interval

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published