[gedit-plugins] Findinfiles: remove deprecated TimeVal



commit fc511caa38221832e4752ff95c85dd69967e0486
Author: Jordi Mas <jmas softcatala org>
Date:   Sun Feb 21 09:24:55 2021 +0100

    Findinfiles: remove deprecated TimeVal

 plugins/findinfiles/job.vala | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/plugins/findinfiles/job.vala b/plugins/findinfiles/job.vala
index 333f195..bad47fc 100644
--- a/plugins/findinfiles/job.vala
+++ b/plugins/findinfiles/job.vala
@@ -66,11 +66,10 @@ class FindJob {
 
     int worker () {
         while (true) {
-            // Wait 0.5 seconds
-            var tv = TimeVal ();
-            tv.add (1000000 / 2);
+            const int ONE_SEC = 1000000;
+            var tv = ONE_SEC / 2;
 
-            var path = scan_queue.timed_pop (ref tv);
+            var path = scan_queue.timeout_pop (tv);
 
             // Check for interruption
             if (cancellable.is_cancelled ())


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