[Top][All Lists]

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

[GNUnet-SVN] [gnunet-nim] branch master updated: add isAlive

From: gnunet
Subject: [GNUnet-SVN] [gnunet-nim] branch master updated: add isAlive
Date: Mon, 24 Jun 2019 13:37:04 +0200

This is an automated email from the git hooks/post-receive script.

lurchi pushed a commit to branch master
in repository gnunet-nim.

The following commit(s) were added to refs/heads/master by this push:
     new 486e471  add isAlive
486e471 is described below

commit 486e471aebd76066559494dced7afbcbbfb96359
Author: lurchi <address@hidden>
AuthorDate: Mon Jun 24 13:35:51 2019 +0200

    add isAlive
 src/gnunet_nim.nim | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gnunet_nim.nim b/src/gnunet_nim.nim
index af482b6..1e87455 100644
--- a/src/gnunet_nim.nim
+++ b/src/gnunet_nim.nim
@@ -47,6 +47,9 @@ proc shutdownGnunetApplication*() =
 proc doWork*(app: ref GnunetApplication) =
   discard GNUNET_SCHEDULER_do_work(app.schedulerHandle) #FIXME: don't discard
+proc isAlive*(app: ref GnunetApplication): bool =
+  app.tasks.len() > 0 and app.timeoutUs > 0
 proc microsecondsUntilTimeout*(app: ref GnunetApplication): int =
   ## get the duration until timeout in microseconds
   let now = GNUNET_TIME_absolute_get()

To stop receiving notification emails like this one, please contact

reply via email to

[Prev in Thread] Current Thread [Next in Thread]