public FilesWatcher(int periodInSec) {
		period = periodInSec * 1000;
		timer = new Timer();

		timer.schedule(new TimerTask() {
			@Override
			public void run() {
				List<File> hasChanged = new ArrayList<File>();
				synchronized (LOCK_WATCHERS) {
					for (FileWatcher watcher : watchers) {
						if (watcher.hasChanged())
							hasChanged.add(watcher.getFile());
					}
				}
				// - Not synchronized in order to avoid dead locks
				if (!hasChanged.isEmpty()) {
					File[] changedFiles = new File[hasChanged.size()];
					changedFiles = hasChanged.toArray(changedFiles);
	
					for (FilesWatcherListener t : listeners) {
						t.fileModified(new FilesWatcherEvent(changedFiles));
					}
				}
			}
		}, 10000, period);
	}