#18 move to event-driven main loop
[fanfix.git] / src / jexer / TTimer.java
index 622d89cb1df74a14ba2e846367b8f31fe19eeb8b..a86c132febbcfb31977ef6a73989e3846905d2ce 100644 (file)
@@ -3,7 +3,7 @@
  *
  * The MIT License (MIT)
  *
- * Copyright (C) 2016 Kevin Lamonte
+ * Copyright (C) 2017 Kevin Lamonte
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -60,6 +60,15 @@ public final class TTimer {
         return nextTick;
     }
 
+    /**
+     * Set the recurring flag.
+     *
+     * @param recurring if true, re-schedule this timer after every tick
+     */
+    public void setRecurring(final boolean recurring) {
+        this.recurring = recurring;
+    }
+
     /**
      * The action to perfom on a tick.
      */