public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Jonathan Haws <Jonathan.Haws@sdl.usu.edu>
To: "sw@simonwunderlich.de" <sw@simonwunderlich.de>
Cc: "b.a.t.m.a.n@lists.open-mesh.org" <b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] alfred: Externalized synchronization interval
Date: Mon, 15 Aug 2016 14:59:05 +0000	[thread overview]
Message-ID: <1471273146.4556.6.camel@c00941> (raw)
In-Reply-To: <2051990.AEtJ42fJkW@prime>

> > ALFRED_INTERVAL is now externalized via the -p option (synchronization
> > period).  If specified as option, user supplied interval is used,
> > otherwise the default interval of ALFRED_INTERVAL is used.
> [...]
> > --- a/server.c
> > +++ b/server.c
> > @@ -372,7 +372,7 @@ int alfred_server(struct globals *globals)
> > 
> >  	while (1) {
> >  		clock_gettime(CLOCK_MONOTONIC, &now);
> > -		now.tv_sec -= ALFRED_INTERVAL;
> > +		time_diff(&now, &globals->sync_period, &now);
> 
> I believe this at least deserves a comment, or must be made more clear in the 
> code.

This change simply does exactly what the previous code did - subtracts
the interval from the current time.  It utilizes the existing
time_diff() routine to account for nanoseconds.

If you need me to resubmit with that language in the commit text or in a
C comment, I can do that.

Thanks!

  reply	other threads:[~2016-08-15 14:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28 20:43 [B.A.T.M.A.N.] [PATCH] alfred: Externalized synchronization interval Jonathan Haws
2016-08-06 16:38 ` Sven Eckelmann
2016-08-10 19:59   ` Jonathan Haws
2016-08-12  8:20     ` Simon Wunderlich
2016-08-12  8:18 ` Simon Wunderlich
2016-08-15 14:59   ` Jonathan Haws [this message]
2016-08-15 15:09     ` Simon Wunderlich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471273146.4556.6.camel@c00941 \
    --to=jonathan.haws@sdl.usu.edu \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=sw@simonwunderlich.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox