Allow to set sync interval refs #461

See the issue #461 for context.
I added a very basic unit test.