[iagno] Use Timeout.add_seconds(), not Timeout.add()



commit 469b7f0ebe9a8406e1648542e2911c3451afd861
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Jan 16 22:09:26 2014 -0600

    Use Timeout.add_seconds(), not Timeout.add()
    
    These won't save much power, since they were only used at most on the
    first and last turn, but might as well.

 src/game-view.vala |    2 +-
 src/iagno.vala     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/game-view.vala b/src/game-view.vala
index 0487ea0..d38acef 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -262,7 +262,7 @@ public class GameView : Gtk.DrawingArea
              * Show the actual final positions of the pieces before flipping the board.
              * Otherwise, it could seem like the final player placed the other's piece.
              */
-            Timeout.add (2000, () =>
+            Timeout.add_seconds (2, () =>
                 {
                     flip_final_result_now = true;
                     square_changed_cb (x, y);
diff --git a/src/iagno.vala b/src/iagno.vala
index e426838..d40f68a 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -240,7 +240,7 @@ public class Iagno : Gtk.Application
          * thinking - but only a short delay for the first move)
          */
         if (dark_computer != null)
-            computer_timer = Timeout.add (1000, computer_move_cb);
+            computer_timer = Timeout.add_seconds (1, computer_move_cb);
     }
 
     private void update_ui ()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]