EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: NTP time provider and ticksPerSecond
From: Michael Westfall <[email protected]>
To: Andrew Johnson <[email protected]>
Cc: [email protected]
Date: Tue, 17 May 2016 15:34:26 -0300
Thanks.
Yes, we're using base-3.14.12.4

I had already fixed it here by adding the following to osiNTPTime.c:

/********************************************************
 * This function added my MDW 2016-005-17 to notify
 * NTP time provider that the system tick rate has been
 * updated.
 */
void NTPTimeUpdateTickRate(void)
{
    NTPTimePvt.ticksPerSecond = osdTickRateGet();
    NTPTimePvt.nsecsPerTick   = NSEC_PER_SEC / NTPTimePvt.ticksPerSecond;
}


Our custom clock tick provider driver calls this after changing the system tick frequency.

I do like the idea of the NTP time provider updating it's tick frequency automatically like in the patch you attached.   That's a more elegant solution.


On Tue, May 17, 2016 at 12:24 PM, Andrew Johnson <[email protected]> wrote:
Hi Mike,

On 05/17/2016 11:05 AM, Michael Westfall wrote:
> Is there a way to delay initializing the NTP time provider until after
> my custom clock tick provider has set the system clock tick rate?

There was a change committed to the 3.15 branch of Base before 3.15.1 to
make the NTP time provider adjust automatically to changes in the system
clock tick rate. Changing the tick rate after iocInit is not advisable,
but in your case this change may be all you need. Since you're evidently
using a 3.14.12 release of Base you should be able to apply the attached
patch file to your copy.

HTH,

- Andrew

--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon



--
Mike Westfall
Control Systems Software Engineer



References:
NTP time provider and ticksPerSecond Michael Westfall
Re: NTP time provider and ticksPerSecond Andrew Johnson

Navigate by Date:
Prev: Re: NTP time provider and ticksPerSecond Andrew Johnson
Next: Re: NTP time provider and ticksPerSecond Matt Rippa
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: NTP time provider and ticksPerSecond Andrew Johnson
Next: Re: NTP time provider and ticksPerSecond Matt Rippa
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·